Tengo un bokeh rect y una información sobre herramientas que muestra información sobre cada celda en el rect. Me gustaría hacer clic en una celda y la información sobre herramientas debe permanecer mientras haga clic en otra celda en el rect. Supongo que podría funcionar con JS pero no sé cómo implementarlo.
Mi función de información sobre herramientas se ve así:
from bokeh.models import HoverTool def hovertool(): tooltips = """ <div> <style> .city { background-color: tomato; width:550px!important; max-height:900px!important; overflow-y:auto; } </style> <div class="city"> <h2>Paris</h2> <div> <span style="font-size: 18px; font-weight: bold; color:black; background-color: white;"> Test </span> </div> </div> </div> """ TOOLTIPS = HoverTool(tooltips = tooltips) return TOOLTIPSEn mi función principal lo uso como:
TOOLTIPS = hovertool() p.add_tools(TOOLTIPS) show(p)¡Gracias por cualquier pista!