Hover Tooltip doesn't work correctly at bokeh 2.2.1

I try datetime hover tool tip with Python Program at here( http://docs.bokeh.org/en/1.0.2/docs/user_guide/examples/tools_hover_tooltip_formatting.html ). It worked good at Bokeh1.4.0. However tool tip becomes strange when I upgrade bokeh to version 2.2.1.
Hover tooltip show three data, "date: close: volume: ". date: & close: are changed as follows.
date: 2011-04-04 --> 130187520000000
close : $331.83 --> $3318300%
(bokeh version : 1.4.0 --> 2.2.1)
I guess new version bokeh is something wrong at tooltip format handling.
I hope someone could help me.

Note: I execute following two python command to download required AAPL data.
import bokeh.sampledata
bokeh.sampledata.download()

There was an intentional change made at version 2.0 to make some things more consistent:

https://docs.bokeh.org/en/latest/docs/releases.html#hovertool-formatters-specification

Please always consult the release notes any time you jump large versions. We publish migration guides specially to help with questions like this.

Bryan, thank you very much for your prompt reply.
I changed formatters code as follows and fixed my problem. I will read migration guide carefully next time when I upgrade bokeh.

** How I change python code. **
< before >
formatters={
‘date’ : ‘datetime’,
‘adj close’ : ‘printf’,
},

formatters={
@date’ : ‘datetime’,
‘@{adj close}’ : ‘printf’,
},

Thank you again for your very quick & kind support !!

1 Like