This is a migrated thread and some comments may be shown as answers.

Showing min and max of a series inside of chart

2 Answers 163 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Pascal
Top achievements
Rank 1
Pascal asked on 15 May 2013, 10:54 AM
Hi everyone,

I would like to display two horizontal lines for minimum and maximum values of a series in a chart. My current approach is to find the min and max values by hand and create two additional series where all points have the same value. The visual result is ok, but since I am refreshing the chart every couple of seconds the performance is not very good on mobile devices. Is there a way to create those horizontal min/max lines differently or is it possible to create a series with just two points that fills to complete width of the chart?

Best regards,

Pascal

2 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 15 May 2013, 12:34 PM
Hi Pascal,

I would suggest that you do not use two new series but bands, I guess they are much faster than series. If you draw them flat enough, they appear as a line, e.g.:

                plotBands:
                    [
                         { from: -100, to: -99, color: "#FF0000" },
                         { from: 20, to: 21, color: "#0000FF" }
                    ]

Alternatively, you could just use one single band that reaches from min up to the max value.

Cheers,
Robert
0
Pascal
Top achievements
Rank 1
answered on 15 May 2013, 01:43 PM
Thats exactly what I was looking for. The performance is mich better than with the additional axis and the creation of the plotbands is much simpler.

Thank you!
Tags
Charts
Asked by
Pascal
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Pascal
Top achievements
Rank 1
Share this question
or