Python: Bokeh hover date time

前端 未结 2 1496
既然无缘
既然无缘 2020-12-16 16:50

I am trying to get a line plot via Bokeh in Python. I am new to Bokeh and I am trying to apply hover tool tips over the plot. The x-axis of the plot has Timestamp values whi

2条回答
  •  眼角桃花
    2020-12-16 17:39

    Sorry for not commenting, I don't have enough reputation for that.

    The accepted answer by @Alex doesn't work for me (Bokeh 2.0.1), because it is lacking a simple @-sign in the formatter. The working code is this:

    HoverTool(tooltips=[('date', '@DateTime{%F}')],
              formatters={'@DateTime': 'datetime'})
    

提交回复
热议问题