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

Read Autoranged Y Axis Min/Max Values

1 Answer 41 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 31 Aug 2011, 07:41 PM
With Autorange set to true, is it possible to read the MinValue or MaxValue of a chart's axis after the chart has been populated?

In my tests, Chart.DefaultView.ChartArea.AxisY.MinValue is not updated and I don't see those values in any other other obvious locations.

1 Answer, 1 is accepted

Sort by
0
Joel
Top achievements
Rank 1
answered on 01 Sep 2011, 03:48 PM
Ah ha:
RadChart chart = xxx;
chart.UpdateLayout();
double minValue = chart.DefaultView.ChartArea.AxisY.ActualMinValue;
double maxValue = chart.DefaultView.ChartArea.AxisY.ActualMaxValue;

I do this right after populating the chart with new data, so I had to call UpdateLayout to avoid getting intermediate values.
Tags
Chart
Asked by
Joel
Top achievements
Rank 1
Answers by
Joel
Top achievements
Rank 1
Share this question
or