Description
I would like to create animations with Dash but I'm stuck at displaying the simple Play button in the Layout. Is the "updatemenus" key not available in the Julia version?
`
app = dash()
app.layout = html_div() do
html_div(html_button("Plot", id="b1")),
html_div(dcc_graph(id="g1"))
end
callback!(
app,
Output("g1", "figure"),
Input("b1", "n_clicks")
) do nc
tall = 0:1e-3:1
yall = randn(length(tall))
data = scatter(;x=tall,
y=yall,
mode="lines")
layout = Layout(;
#yaxis_range = [-100, 100],
xaxis_type = "linear",
xaxis_title = "t [s]",
yaxis_title = "y []",
title="Primary Graph",
legend_x = 1,
legend_y = 1,
hovermode = "closest",
hoverlabel=(font=(size=10,),font_family="Rockwell"),
transition_duration = 5,
updatemenus=[(visible=true, type="buttons", buttons=(label="Play", method="animate", args=[nothing]))]
)
return Plot(
data,
layout,
[frame(name="a", data=data)]
);
end
run_server(app, "0.0.0.0", 8080, debug=true)
`