How to automatically create a callback for automatically created sliders and graphs

I have an app that is for plotting line charts of different parameters with the following functionality:

I have been able to make it such that for each parameter selected, the line graph will be plotted along with a slider for varying the date and parameters.

The sliders are to help the user to interact with the plot to see data at different values and time.

The date slider is not a problem.

The problem is the parameter sliders, they are able to be created but my problem is how do I connect them to the graph as they are automatically created and the parameters vary from one data to another.

Is there a way of creating automatic callbacks because that is the only way I know to tie a component to the data.

Hi, refer to

Thanks but it is not what i am looking for

Unfortunately, you must not have read the content I gave in detail.

@stu, that’s true, I thought it was just the adding of the dropdown.
I ran the code and saw that on clicking, a call back was created or something like that.

Thanks but I don’t understand most of the codes though, I guess it is not my level :grinning:

Could you advice me on something to learn to use and solve it?
Like a topic or something
Something that you applied to give solution to the suggested post you sent.

You can check out my Daily series.

Learning about Pattern-matching callbacks will help you a lot with your present issues.

And I used dynamically sliders here.


Another idea is, don’t think about creating it, but just leave that slider there and display it when it’s available. @trinityimma

1 Like

Thanks for the resources on pattern-matching @stu .

Great idea about the display and hide.
But when the parameters changes based on imported data, it might be a little difficult to do using the show and hide.
I will implement using show and hide first while I try pattern-matching callbacks later.

@stu Thanks for the tips on the pattern-matching, I was able to use it to solve the issue.
I will post an example of the solution for future reference.

1 Like