Hello, Iโd like to update the data on the fly as Iโm moving sliders on my figure. Is it possible to give in the args of the step some function with arguments that is called whenever the slider is moved? The arguments passed to the function will depend on two different sliders, hence why I cannot precompute all the traces (that would be too heavy for the figure).
import plotly.graph_objects as go
import plotly.offline
fig = go.Figure()
fig.add_trace(go.Scatter("x":xValues,"y":f(param_values[0]))
steps = []
for i in range(nValues):
    p = param_values[i]
    step = {"method": "restyle",
            "args": [{"y":f(p)}], # change this to call f with arg p each time the slider is moved
            "label": f"{x:.2g}"}
    steps.append(step)
    
sliders = [{"active": 0,
            "currentvalue": {"prefix":"value "},
            "pad": {"t":50},
            "steps": steps}]
fig.update_layout(sliders=sliders)
plotly.offline.plot(fig)