Hey,
is it possible to apply a hover tool for a line-plot? What I find very strange: My plot is working and being shown, but as soon as I put “hover” in my tools, it is not shown and i see a white page that only says “Plots”. No difference if output_notebook or output_file is set. I am using Google Chrome.
What is the input for the hover dict? Does it have to have as many entries as my x-range is long?
I want my hover tool to show the values of other, not-plotted columns that give additional information to the plot.
And for the hover dictionary, I’ve both seen $ and @ in use, does it make a difference?
for plot in plots:
source = ColumnDataSource(
data=dict(
test = plot
)
)
y = plot
l = line(x,y,
x_range=x_range[0],
source = source,
title=getTitle(laufendeNummer),
color="#000000",
x_axis_type="datetime",
legend=getLegend(laufendeNummer),
plot_width=1000, plot_height=300,
tools = "pan, hover,box_zoom, wheel_zoom")
xaxis()[0].axis_label="Zeit"
ylabel = "["+getUnitByCol(getColum(Was[laufendeNummer]))+"]"
yaxis()[0].axis_label=ylabel
# We want to add some fields for the hover tool to interrogate, but first we
# have to get ahold of the tool. This will be made easier in future releases.
hover = [t for t in curplot().tools if isinstance(t, HoverTool)][0]
hover.tooltips = OrderedDict([
("Test", "$test"),
])
x_range[0]=l.x_range
allPlots.append([l])
laufendeNummer = laufendeNummer + 1
Greetings
Thomas