Hello,
I am trying to use a hook to add more lines based on another variable. The add_glyph
seems to work correctly as I get 2 renderers. However, they are not shown in the plot.
How can I make it visible?
import holoviews as hv
from holoviews import opts, streams
from bokeh.models import Line, ColumnDataSource
hv.extension("bokeh")
def add_time_series(plot, element):
source = ColumnDataSource(dict(x=[1,2,3,4], y=[5,5,5,5]))
line = Line(x="date", y="y")
plot.state.add_glyph(source, line)
assert len(plot.state.renderers) == 2
hv.Curve([1,1,1,1]).opts(hooks=[add_time_series], framewise=True)