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

Marked Zone and YAxis AutoScale Issue

1 Answer 82 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 2
Eric asked on 12 Jul 2010, 03:52 PM
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

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 14 Jul 2010, 10:14 AM
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
Tags
Chart (Obsolete)
Asked by
Eric
Top achievements
Rank 2
Answers by
Ves
Telerik team
Share this question
or