Add Hover from list to bokeh HeatMap

Hello everybody,

I’m using bokeh for a couple of days now (it’s so cool.) and I realised this HeatMap with the default parameters :

`dates = table.index.tolist()

TOOLS = “pan, reset, save, hover”

hover = HoverTool(
tooltips=[
(“date”, “@dates”),
]
)`
hm = HeatMap(table, title=“heatmap freq”, width=800, palette=palette, tools=TOOLS)
show(p)

``

The xaxis is the weekofyear, so each case represents a day.
I would like to add the date to the hover but I have trouble doing it since it’s not on the source table. I created a list that contains each date of each case but when I call :
but the hover seems to ignore my tool**tips entry :

If needed, my table looks like this :

What am I missing ?
Thank you guys for lending me your neurons !

I think maybe you need to put the dates inside a ColumnDataSource and then tooltip would be able to use the @dates.

would you mind attach the data (dummy data would be fine), so i can try to come up with some code?

Also new to Bokeh, but find it amazing!

bests,

Paul

···

On Monday, 21 September 2015 23:19:56 UTC+8, Florian Gauthier wrote:

Hello everybody,

I’m using bokeh for a couple of days now (it’s so cool.) and I realised this HeatMap with the default parameters :

`dates = table.index.tolist()

TOOLS = “pan, reset, save, hover”

hover = HoverTool(
tooltips=[
(“date”, “@dates”),
]
)`
hm = HeatMap(table, title=“heatmap freq”, width=800, palette=palette, tools=TOOLS)
show(p)

``

The xaxis is the weekofyear, so each case represents a day.
I would like to add the date to the hover but I have trouble doing it since it’s not on the source table. I created a list that contains each date of each case but when I call :
but the hover seems to ignore my tool**tips entry :

If needed, my table looks like this :

What am I missing ?
Thank you guys for lending me your neurons !