Hi,
The formatters dict should reference the CDS column name that you want to format, not the arbitrary tooltip label text:
tooltips = [('Time', '@height')]
hover = bar.select(dict(type=HoverTool))
hover.formatters = {'height': "datetime"} # need CDS column name as key
Thanks,
Bryan
On Jun 28, 2017, at 10:21, C workmailcharlotte@gmail.com wrote:
Hello,
I want to use the datetime formatting for the hovertool, but I’m not sure how to get it working.
So far I am adding and formatting my hovertool like this:
#add hovertool
tooltips = [
('Time', '@height')
]
hover = bar.select(dict(type=HoverTool))
hover.formatters = {‘Time’: “datetime”}
hover.tooltips = tooltips
My y-axis is in datetime format. But the Hovertool still shows my time as the full numerical value.
Cheers!
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/684b92a7-32b1-4b80-94e7-7b5fe7b4056b%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/gjTKblmmnf8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/A1195914-CB4F-4235-B406-1F57D3BD23AF%40continuum.io.