Можно ли добавить всплывающие подсказки в таблицу временных рядов?
В приведенном ниже примере упрощенного кода я хочу видеть имя одного столбца ("a", "b" или "c"), когда указатель мыши находится над соответствующей строкой.
Вместо этого "???" отображается, и ВСЕ три строки получают всплывающую подсказку (а не только ту, которая над ним находится)
По документации ( http://docs.bokeh.org/en/latest/docs/user_guide/tools.html#hovertool), имена полей, начинающиеся с '@', интерпретируются как столбцы в источнике данных.
Как я могу отобразить "столбцы" из DataFrame pandas во всплывающей подсказке?
Или, если высокоуровневый интерфейс TimeSeries не поддерживает это, есть какие-то подсказки для использования низкоуровневых интерфейсов для того же? (строка? multi_line?) или преобразовать DataFrame в другой формат (ColumnDataSource?)
Для бонусного кредита как отформатировать "$ x" для отображения даты в виде даты?
заранее спасибо
import pandas as pd
import numpy as np
from bokeh.charts import TimeSeries
from bokeh.models import HoverTool
from bokeh.plotting import show
toy_df = pd.DataFrame(data=np.random.rand(5,3), columns = ('a', 'b' ,'c'), index = pd.DatetimeIndex(start='01-01-2015',periods=5, freq='d'))
p = TimeSeries(toy_df, tools='hover')
hover = p.select(dict(type=HoverTool))
hover.tooltips = [
("Series", "@columns"),
("Date", "$x"),
("Value", "$y"),
]
show(p)