How to you add min and max lines to a line series chart?

4 posts, 0 answers
  1. IDispose
    IDispose avatar
    12 posts
    Member since:
    Apr 2010

    Posted 26 Oct 2011 Link to this post

    How do you indicate a range in a line series? I want to display a horizontal line at top indicating the Max of the series and another toward the bottom to indicate Min so users get a visual clue if values fall outside the said range. 

    Can't find documentation.

    Thanks
  2. Georgi
    Admin
    Georgi avatar
    296 posts

    Posted 28 Oct 2011 Link to this post

    Hello Ramesh,

    Please refer to the support ticket you have submitted for the same issue. I am posting the reply here so that other users can see it also:

    This feature is currently not supported in our charting component. You can however implement it with minimal efforts - you can overlay the chart with two line shapes and update their X,Y values according to the LayoutSlot property of the Min/Max data points. Something like:

    DataPoint point = this.radChart1.Series[0].DataPoints[5];
    RadRect layoutSlot = point.LayoutSlot;
      
    // update the line shape with the layout slot position

    We will put this feature in our backlog repository and will do our best to implement it as soon as possible.
    I would like to thank you for your feedback and for this feature request - I have updated your Telerik points for your time.
    Greetings,
    Georgi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Sergio
    Sergio avatar
    5 posts
    Member since:
    Apr 2012

    Posted 18 Nov 2012 Link to this post

    I need to do exactly the same, but looks like you sample code is missing some lines.

    Can you please verify again?

    Thank you,
    .Sergio
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 22 Nov 2012 Link to this post

    Hello Sergio,

    Thanks for writing.
    In order to implement this, you have to put a Canvas on top of the chart. Then, put two Line shapes in the canvas, one representing your min value and the other the max value. You can determine your min/max range arbitrarily or base it some of the chart's data points (you have access to them through the series' DataPoints property). If you choose to base your range on actual data points, please keep in mind that each point's layout slot is in the same coordinate system as the chart's plot area. You can get the plot area layout slot via the PlotAreaClip property of RadChart.

    I hope that's helpful, if you have other questions, please write again.

    Greetings,
    Victor
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top