Graphing component for Dash. Forked from the core Graph component, with modified extend/prepend properties to accept data formats matching `figure["data"]`
The doc page is a little misleading saying that updateData contains data:
... in a format matching figure['data']
Specifically, I naively thought I could include trace name there and it would figure out the correct trace to append data to (or create new):
dict(x=[1], y=[1], name='Trace 1')
That works on initial load (because it just creates a new plot) however on subsequent updates it fails because it assumes trace indices are simply linearly increasing, and also because passing name to extendTraces throws an error.
It would be very convenient if that was handled automatically, namely:
If name is present, check if it matches any of existing traces.
If it does, that's the trace to extend (and also name should be removed from the data passed to extendTraces).
The doc page is a little misleading saying that
updateData
contains data:Specifically, I naively thought I could include trace
name
there and it would figure out the correct trace to append data to (or create new):That works on initial load (because it just creates a new plot) however on subsequent updates it fails because it assumes trace indices are simply linearly increasing, and also because passing
name
toextendTraces
throws an error.It would be very convenient if that was handled automatically, namely:
name
is present, check if it matches any of existing traces.name
should be removed from the data passed toextendTraces
).