I have a basic line chart, it works. I add fill=‘tozeroy’ and it decides to fill down to y0. I want it to only fill down to the min y value.
code snippet:
fig = go.Figure()
fig.add_trace(go.Scatter(
x=data_time,
y=data_value,
fill='tozeroy', # <--- if this is removed the Y values are Ymin to Ymax...need that to remain after fill.
))
I found this code snippet that works to set the min and max if you manually input values. But if I add my list with floating point values I get an error. Code and error below:
fig.update_yaxes(range=[min(float_value), max(float_value)])
Error:
TypeError: ‘<’ not supported between instances of ‘float’ and ‘str’
I don’t have a ‘<’ anywhere and I don’t understand why it’s trying to compare a float and a string. Can anyone help clear up how/what it wants?
Thank you