Hi, I am trying to set range of xaxis of a graph in callback function. From my understanding, the only way to do is by returning the figure
property:
@app.callback(
Output(component_id='graph_id', component_property='figure'),
[Input(component_id='btn_custom_x_range', component_property='n_clicks')]
)
def set_custom_range(clicks):
return {
"data": data,
"layout":
{"xaxis": {
"range": [1, 2]
}
...
}
...
}
My concern is, that this way I am sending the whole data
object back to the client again. I would like to avoid this, as the data collection is quite huge.
Is there a way, how to update the xaxis.range without resending all the data?