This is correct. Right now, there is not a way to update a nested attribute of a property.
Ideally, I’d like to support this more generally through two different solutions:
- Allow the developer to update nested properties in callbacks with something like
@app.callback(Output('my-graph', 'figure.layout.range'))
- Provide a way to tell which input was fired and use that in conjunction with
Plotly.react
to provide incremental updates to the figure, see https://github.com/plotly/plotly.js/pull/2341#issuecomment-364257543
For now, you can use jimmybow’s dcc
package or you’ll just have to return the entire figure each time.