TK5EP
TK5EP

Reputation: 121

Highcharts, how to put markers on min/max values on yAxis

I have a Highchart graph with xAxis being datetime, on yAxis i have different datas. One is the temperature. I would like to put markers on the Min and Min values for each day, like this :enter image description here How can i do this ?

Thanks,

Upvotes: 0

Views: 905

Answers (1)

Deep 3015
Deep 3015

Reputation: 10075

You can add flags to show min max values. I am using flags with highstock js. On load event I am finding min and max values and add series of type flags.

this.addSeries({
            type: 'flags',
            data: [{
              x: newArr[maxIndex].x,
              y: newArr[maxIndex].y,
              title: 'Max:'+newArr[maxIndex].y,
            },{
              x: newArr[minIndex].x,
              y: newArr[minIndex].y,
              title: 'Min: '+newArr[minIndex].y,
            }],

          });

Fiddle demo

Upvotes: 2

Related Questions