Showing min and max of a series inside of chart

3 posts, 1 answers
  1. Answer
    Pascal
    Pascal avatar
    8 posts
    Member since:
    Nov 2012

    Posted 15 May 2013 Link to this post

    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. Robert
    Robert avatar
    23 posts
    Member since:
    Jun 2012

    Posted 15 May 2013 Link to this post

    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
  3. Pascal
    Pascal avatar
    8 posts
    Member since:
    Nov 2012

    Posted 15 May 2013 Link to this post

    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!
Back to Top