Hover on multiline not showing


I have this in bokeh 1.4.0

linesClosedPos = p.multi_line(xs="tradeTimes", ys="tradePrices", line_cap="round", line_color="black", 
             line_alpha=0.6, hover_line_alpha=1.0, line_width=3, source=closedPosSource)
p.add_tools(HoverTool(show_arrow=False, line_policy='interp',
                      tooltips=[("Date",'@time{%Y-%m-%d %H:%M:%S}'), ("Cost",'@cost')], formatters={
        'time': 'datetime'} , mode='vline'))

in a bokeh server.

The hover tool is available and active in the tool list but I can’t get any tooltip to show.

The x axis is a time axis.

I set hover_on_line_alpha=1.0 but when I hover the alpha doesn’t change too.

Thanks !

Hi Skealz,

Are you able to provide more code? A minimal example that reproduces the problem, that someone else can copy and paste and run, would be helpful for testing and identifying the issue.

Ok I think I’ve got the the issue.

You can test the non-functionnal hover with this code

from bokeh.plotting import figure
from bokeh.io import curdoc
from bokeh.layouts import column, layout, row
from bokeh.models import HoverTool

TOOLS = "pan,wheel_zoom,box_zoom,reset,save"

p = figure(x_axis_type="datetime",  tools=[TOOLS], plot_width=500, title = "Candlestick", name="candleChart", 

linesClosedPos = p.multi_line(xs=[[1579214225158, 1579210745530], [1577649385506, 1577639862148]], 
                              ys=[[7830, 7798], [6679.9, 6602.0]], 
                              line_cap="round", line_color="black", 
             line_alpha=0.6, hover_line_alpha=1.0, line_width=3)
p.add_tools(HoverTool(show_arrow=False, line_policy='next', renderers=[linesClosedPos], mode='vline'))

l = column(p, sizing_mode='stretch_both')

It was quite hard to find. It seems like the hover goes away with high and close values of xs points. If I increase the difference between two point along the x axis, the hover works better.

If I have these values it is because I use datetime as x axis with unix time in milliseconds.

Maybe as a workaround I could use unix time in seconds.