I have a pandas DataFrame:
I A A2 B B2
1 'dog' 10 'cat' 20
2 'elf' 15 'egg' 45
3 'hat' 80 'bag' 50
I have then converted this into a Bokeh DataTable but have only included columns I, A and B.
I'd like to add a tooltip for the cells in columns A and B and to show the corresponding value in A2 or B2. So, for example if you were hovering over 'dog', the tooltip would be 10 and if you hovered over 'bag' the tooltip would be 50.
From what I understand, there isn't (yet) a way to add a tooltip using HoverTool, which can be done on scatter plots etc. But this answer suggests a workaround is possible, although in that example the tooltip shows only the value already displayed in the table. How would I get the tooltip to show the corresponding value instead?
from Add tooltip to Bokeh DataTable
No comments:
Post a Comment