Hi, iam trying to change a graph when a button is clicked.
this is what the two charts should look like
But when i try to change the lower graph, the upper one just disappears
This is the code i use to generate the layout:
curdoc().add_root(desc)
# set up layout
c1 = column(stock, days)
c2 = column(ts1)
r1 = row(c1, c2)
curdoc().add_root(r1)
cCalc = column(select_varianzred, daysToKeepTheStock, iterations, button)
c2Calc = column(hg1)
r2 = row(cCalc, c2Calc)
curdoc().add_root(r2)
(having just one add_root doesnt change the outcome)
and this is the code is use to replace the graph:
hg_ = figure(title="Histogram", id='histog', plot_width=900, plot_height=300, tools=tools)
hist_, edges_ = np.histogram(mc_returns, density=True, bins=50)
hg_.quad(top=hist_, bottom=0, left=edges_[:-1], right=edges_[1:])
r2.children[1] =hg_
iam thankful for any input
bokeh version 12.4


