Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Add_hline only draws between values x=0 and x=1

My understanding from the documentation is that the new add_hline() would create a line that spans the entire plot.

Yet, in my use case, when I added one to a plot that has a categorical x axis with 65000 values (numbered 0 to 65000), the line only spanned values 0 to 1 in the x axis.

I looked at the graph in chart_studio, and indeed, it is set to start=0, end=0, relative to: “X”…

1 Like

I am seeing the same behavior. I am using plotly with streamlit.
When I use the (which sends the plot to a new browser window) instead of the st.plotly_chart(fig) the annotation appears correct.
Are you using plotly with streamlit?