Marked Zone and YAxis AutoScale Issue

Thread is closed for posting
2 posts, 0 answers
  1. Eric
    Eric avatar
    4 posts
    Member since:
    Dec 2008

    Posted 12 Jul 2010 Link to this post

    Hello everyone,

    I'm using a marked zone as a horizontal baseline for a chart per the many examples on this site.  This is working fine as long as the data in the chart series are close in value to the marked zone's ValueStartY and ValueEndY properties.  If not, the marked zone's position is outside of the viewable plot area.  Is there a way to ensure that the marked zone always shows up?  Also, the data is quite variable, and the chart implementation is designed to accomodate several types of charts (an engine of sorts), so we can't just assume a visible min/max for the Y axis.  Any help is greatly appreciated.  Thanks!

    Eric
  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 14 Jul 2010 Link to this post

    Hi Eric,

    You have found the two options, available in RadChart:
     - Use the AutoScale feature - this way the Y axis range is automatically calculated, but it is possible that the marked zone is hidden i.e. outside the axis range
     - Set the Y axis range manually by calling the AddRange(min, max, step) method. Unfortunately, this might not be always possible as min and max might be unknown.

    A possible workaround would be to wire the ItemDataBound event of RadChart and keep track of the min and max value plotted (available through e.SeriesItem.YValue). Then, depending on their values compared to the baselineValue you can decide whether to keep the AutoScale feature (that would be if baselineValue is between min and max) or set AutoScale to false and manually define the axis range so that the marked zone is visible.

    Best regards,
    Ves
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top