lovelace-plotly-graph-card icon indicating copy to clipboard operation
lovelace-plotly-graph-card copied to clipboard

Display min and max values on top of the trace as text, at the correct x positions

Open r-jean-pierre opened this issue 2 years ago • 5 comments
trafficstars

Describe the solution you'd like If not already asked, can we have the min and max value text on top of the curve?" it seems that plotly do not have this option right out the box, but they suggest to the users to construct this feature with the add_annotation feature (https://plotly.com/python/text-and-annotations/) and then, a possible result could be equivalent to:

image

How would it be defined in yaml?

type: custom:plotly-graph
entities:
  - entity: sensor.monthly_internet_energy
    show_extremas: true

r-jean-pierre avatar Mar 01 '23 22:03 r-jean-pierre

wdyt about show_extrema or show_extremes or show_min_max_value ?

dbuezas avatar Mar 01 '23 22:03 dbuezas

All of them are okay. As a lazy boy I did the concatenation of

show:
  extremas: true

from the apex-charts card into show_extremas

But now I just realized that's wrong extremas with the S, it's a latin word, so: 1 extremum, several extrema, so apex-charts writes it wrong :)

r-jean-pierre avatar Mar 02 '23 19:03 r-jean-pierre

exactly!

dbuezas avatar Mar 02 '23 19:03 dbuezas