Hi,
I’m running a live graph that updates a trace every 100ms via a combination of a dcc.Store and and different dcc.interval(s). I would like to have multiple traces in my graph, but I’m not able to get the right ‘extendData return’ in the javascript callback.
I’m currently returning this for a single trace and that works fine. Does anyone know how to modify the return line in order to work with multiple traces?
app.clientside_callback(
"""
function (...) {
return [[{x: [data.x.slice(offset, end)], y: [data.y.slice(offset, end)]}, [0], 250], end, data.x[offset], value_first];
}
""",
[
Output("graph", "extendData"), # dcc.graph item
Output("offset", "data"), # dcc.Store items below
Output("time-offset", "data"),
Output("first-value", "data"),
],
)
4 posts - 2 participants








