Thank you very much for explicitly confirming that. Since reading that, I have chosen to work with your original library, and it has worked for me without a lot of the hitches that the current plotly/Dash implementation forces. Quite honestly, it is remarkable how strightforwardly your original library works.
In that vein, I have a question about reloading indices (along somewhat similar lines as what nathand was exploring).
When my app first loads, I feed my deg.ExtendableGraph()
graph a bunch of figures, and I have found that this works for creating multiple traces, with the following being a snippet of what is sent on the first load:
[Histogram({
'autobinx': False,
'histnorm': 'probability density',
'legendgroup': 'Group 1',
'marker': {'color': 'rgb(31, 119, 180)'},
'name': 'Group 1',
'opacity': 0.7,
'uid': '04fd38bf-ea9a-400c-9b94-880aead9e16d',
'x': [-0.4999999999999999, 0.375, 0.9099999999999999, 0.9099999999999999],
'xaxis': 'x',
'xbins': {'end': 0.9099999999999999, 'size': 0.2, 'start': -0.4999999999999999},
'yaxis': 'y'
}), Histogram({
'autobinx': False,
'histnorm': 'probability density',
'legendgroup': 'Group 2',
'marker': {'color': 'rgb(255, 127, 14)'},
'name': 'Group 2',
'opacity': 0.7,
'uid': '74d73e34-6078-48c0-b0cc-12cdd4b4bdf9',
'x': [0.0, 0.3333333333333333, 0.0, 0.0],
'xaxis': 'x',
'xbins': {'end': 0.3333333333333333, 'size': 0.2, 'start': 0.0},
'yaxis': 'y'
}), Scatter({
'legendgroup': 'Group 1',
'marker': {'color': 'rgb(31, 119, 180)'},
'mode': 'lines',
'name': 'Group 1',
'showlegend': False,
'uid': '5f9b0d80-ab0e-49fd-a852-aeda703edab2',
'x': [-0.4999999999999999, -0.4971799999999999, -0.4943599999999999, ...,
0.9015399999999999, 0.9043599999999997, 0.9071799999999998],
'xaxis': 'x',
'y': array([0.24960125, 0.25015044, 0.25069791, ..., 0.51428571, 0.51358318,
0.51286951]),
'yaxis': 'y'
}), Scatter({
'legendgroup': 'Group 2',
'marker': {'color': 'rgb(255, 127, 14)'},
'mode': 'lines',
'name': 'Group 2',
'showlegend': False,
'uid': '92d21007-e1ae-405a-902c-691dc684843e',
'x': [0.0, 0.0006666666666666666, 0.0013333333333333333, ...,
0.3313333333333333, 0.332, 0.3326666666666666],
'xaxis': 'x',
'y': array([2.39310609, 2.39341321, 2.3936584 , ..., 0.86542708, 0.8644372 ,
0.86343766]),
'yaxis': 'y'
})]
The above is two data sources creating two graphs each. When I update any of the traces (let’s say trace 0
, so the very first one), I send to the same graph [[{'x': [50.0]}], [0]]
, and this works successfully.
However, when I want to reload all my traces, and essentially wipe the slate clean of all the traces and simply send new ones in, I have not figured out how to do that. Whenever I send another chunk of figures like above, I get the following error, attribute: autobinx index: 0 must be an array
, which I do not know how to diagnose.
How could I decide to reload my graph, and start from scratch, to send in completely new data?