How to create a LABELED horizontal threshold line in plotly js?

Viewed 12

(Yes, I'm aware of How to create a horizontal threshold line in plotly js? but that doesn't answer my question)

For Plotly Python, there's a useful method called add_hline. With it I can add labelled horizontal line within the graph. Plotly Python plot

When attempting to translate it into React JavaScript, I cannot find such methods and had to resort to:

  1. Using shapes, which don't have labels suboptimal plot using shapes

  2. Using line chart overlays, which don't extend to full plot area suboptimal plot using line chart overlays

Are there better ways to create a graph that can be easily created with Plotly Python in Plotly.js?

0 Answers
Related