highstock Measure min-max performance
Hallo team, in highstock you have "measure" feature that give me MIN,MAX,AVERAGE,BINS.
Would me more interesting for stock chart to have % difference from min to max or max to min if i measure downward.
is very simple calculation, could you maybe evauate this?
i ask to have:
MIN
MAX
AVG
BINS
%+ (or %-)
vould be also great if measurement feature will have magnet that can be anchor to min/max.
Is not possible to load here one picture, but i hope you understood well. I also opened ticket with picture: #2116 Measure GUI
-
AdminPaweł Fus (Admin, Highcharts JS) commented
Yup, that was just an example for `(min / max)`, updated demo to show the change:`((max - min) / max))` (or `(1 - (min / max))`).
-
Walter Demaria commented
yes, is what i'm looking for. but in your example the calculation get wrong result. if i measure from 156 to 179 the feedback is "Performance +87%" but is something like 15%. isn't it?
-
AdminPaweł Fus (Admin, Highcharts JS) commented
Can you achieve that % difference from min/max values? If yes, then simply use formatter: https://api.highcharts.com/highstock/annotations.measure.typeOptions.label.formatter
For example: https://jsfiddle.net/BlackLabel/3chpat2q/ (you can compare `this.startYMin` and `this.startYMax` to check if measure is upward or downward, the same with `startXMin` and `startXMax` to check if user measured to the left or right). Note that demo changes only `measureXY` button in stock tools.