HoverTool not working with multi_line

Hi there,

I can’t get the HoverTool to work with a multi_line figure. I’ve tried a number of examples online, but I keep getting the same error on the debug console on my webbrowser.

Example script:

def build_document(doc):
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource, HoverTool
from bokeh.io import show, output_notebook
import pandas as pd
import numpy as np

index = ['2018-01-31', '2018-02-28', '2018-03-31', '2018-04-30', '2018-05-31', 
        '2018-06-30', '2018-07-31', '2018-08-31', '2018-09-30', '2018-10-31']

columns = ['Argentina', 'Turkey', 'Mexico']

np.random.seed(123)
data = np.random.rand(10, 3)
df = pd.DataFrame(index=index, columns=columns, data=data)
df_transposed = df.transpose()
source = ColumnDataSource({"xs": [df.index.values.tolist()]*len(list(df.columns.values)), "ys": df_transposed.values.tolist(), "colors": ["red", "green", "blue"], "names": list(df.columns.values)})

output_notebook()
p = figure(plot_height=400, x_range=index)
p.multi_line(xs='xs', ys='ys', color = "colors", name="names", legend_label="names", source=source)
p.xaxis.major_label_orientation = 0.90
p.legend.click_policy="hide"
p.add_tools(HoverTool(tooltips=[('Country', '@names'),
                                ('Date', '$x'),
                                ('Value', '$y')]))

# show(p)
doc.add_root(p)

if __name__ == "__main__":
from bokeh.application import Application
from bokeh.application.handlers.function import FunctionHandler
from bokeh.layouts import column, row
from bokeh.models import ColumnDataSource, DataRange1d, Dropdown, Slider, HoverTool
from bokeh.plotting import figure
from bokeh.server.server import Server

    apps = {"/": Application(FunctionHandler(build_document))}
    server = Server(apps)
    print("Server running at `http://localhost:5006/`")
    server.start()
    server.io_loop.start()

I’m using bokeh version 2.2.3 with python3.6. Is there something I’m missing here? /How can I get this to work? Thanks

Error (on chrome developer console):

Uncaught TypeError: Cannot read property '2' of undefined
at b._update (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:569)
at b.<anonymous> (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:240)
at o.emit (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:181)
at p.inspect (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:258)
at b._inspect (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:569)
at b._move (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:569)
at b.<anonymous> (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:497)
at b.<anonymous> (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:240)
at o.emit (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:181)
at d.trigger (bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:497)