I’m trying to fill to bottom of the graph without changing the graph to go all the way to zero. Is there a way to do this without creating a new line?
ie. Current y-axis goes from 100-200, when fill tozeroy is added, the new y-axis will be 0-200.
I’m trying to fill to bottom of the graph without changing the graph to go all the way to zero. Is there a way to do this without creating a new line?
ie. Current y-axis goes from 100-200, when fill tozeroy is added, the new y-axis will be 0-200.
I see a couple quick solutions, both relating to the figure Layout.
fixedrange=True
.layout = { .., 'yaxis': {'fixedrange': True, 'range': [100, 200], ..}, ..}
You can combine this with the ‘range’ property to define the [100, 200] view.
fig['layout']['yaxis']['range']
) and add that to the layout dict for the figure you will be returning.@app.callback( Output('my-graph', 'figure'), [Input(.. some input or event)], [State('my-graph','figure')]) def update_graph(my_input, fig): range_to_save = fig['layout']['yaxis']['range'] ..