-
Is there any easy way to mark the maximum and minimum values on a plot? I have a plot with a handful of lines (of temperature) and I'd like to see the highest and lowest values at a glance. |
Beta Was this translation helpful? Give feedback.
Answered by
dbuezas
Sep 18, 2025
Replies: 1 comment 3 replies
-
You can add the same sensor on a second entity, set the mode: markers+text
filters:
- fn: |
({ys})=>{
let max = Number.NEGATIVE_INFINITY;
let min = Number.POSITIVE_INFINITY;
for ( const y of ys) {
max = Math.max(y, max);
min = Math.min(y, min);
}
return { ys: ys.map(y => y == max || y == min ? y : null)};
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Spectre5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can add the same sensor on a second entity, set the
mode: markers+text
and remove all but the maximum datapoints: