hover tool for multiple time series

Suppose I make a time series plot (bokeh.charts.Line) with 4 time series

df = pd.util.testing.makeTimeDataFrame(10).cumsum()

dfp = pd.melt(df.reset_index(), [‘index’], [‘A’,‘B’,‘C’,‘D’])

p = bokeh.charts.Line(df, x = ‘index’, y = ‘value’, color = ‘variable’, title = ‘price’)

I want that when I hover over a line, a hover box tells me something like

(‘date’: 2000-01-01, ‘name’:‘A’, ‘value’:1.01)

or even better, when I hover anywhere in the plot, a hover box tells me

(‘date’: 2000-01-01, ‘A’ : 1.01, ‘B’ : 1.03, ‘C’ : 1.05, ‘D’:1.10)

It doesn’t have to be in that form, I just want those information.

Any idea how to do this?

Thanks.

Jimmy

For the first version you wish for, check out my answer on SO:

Not sure how you do the second one, but there probably is a way.

···

On Saturday, September 24, 2016 at 10:59:11 PM UTC+1, Fan Jimmy wrote:

Suppose I make a time series plot (bokeh.charts.Line) with 4 time series

df = pd.util.testing.makeTimeDataFrame(10).cumsum()

dfp = pd.melt(df.reset_index(), [‘index’], [‘A’,‘B’,‘C’,‘D’])

p = bokeh.charts.Line(df, x = ‘index’, y = ‘value’, color = ‘variable’, title = ‘price’)

I want that when I hover over a line, a hover box tells me something like

(‘date’: 2000-01-01, ‘name’:‘A’, ‘value’:1.01)

or even better, when I hover anywhere in the plot, a hover box tells me

(‘date’: 2000-01-01, ‘A’ : 1.01, ‘B’ : 1.03, ‘C’ : 1.05, ‘D’:1.10)

It doesn’t have to be in that form, I just want those information.

Any idea how to do this?

Thanks.

Jimmy