Animate n points along y axis given velocity

Here is the clientside callback:

app.clientside_callback(
    """
    function(frame, fig) {
        newFig = JSON.parse(JSON.stringify(fig))
        newFig['data'][0]['y'] = [0.1 * frame, 0.1 * 2*frame, 0.1 * 0.5*frame]
        return [newFig, frame]
    }
    """,
    Output('graph', 'figure'),
    Output('dump', 'children'),
    Input('interval', 'n_intervals'),
    State('graph', 'figure'),
    prevent_initial_call=True)

@jinnyzor this should look familiar to you :rofl:

1 Like