Dynamically add range slider to layout once graph is generated

On a blank page with only a minimal input, I am trying to be able to create a graph after some input is given by the user, and after the graph is generated, also generate a range slider for it. Essentially, both the graph and slider show up after the input, and the slider only zooms-in/zooms-out on the graph that is already there.

What would be the best way to do this? I was reading through chriddyp’s code here,, but it looks like overkill and possibly not what I am looking for.

Does anyone have any advice on this problem?

1 Like

Still struggling with this!

I haven’t thought about this post for a while, and that’s probably because I figured out the solution after banging my head enough working with plotly more. In the callback that creates the data/handles the input, couldn’t you just create two outputs, one for the graph, and the other for the slider? Tell me if you think that would work out for you.

Working with plotly directly? I haven’t tried that. Just realized that Dash has too many restrictions.

Sorry for responding so late to your reply there in July - even though I was on a break dealing with Plotly, I should still have seen your post.

Yeah, working directly with plotly seems like the secret hack to getting many things going within more complex Dash apps.