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

Force chart max value display height

2 Answers 129 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 16 Jun 2011, 04:53 PM
I'm playing with the chart at the moment and wondered if anyone knows how to set the maximum Y axis value?

For instance, I have a datasourse where the highest value woul be, say for arguments sake, 3. When the chart displays, the top of the chart's value is set to 3. How can I set this to another figure, say 10, even though data doesn't go up this high?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Karl
Top achievements
Rank 1
answered on 20 Jun 2011, 05:09 PM
Anyone?
0
Accepted
Peshito
Telerik team
answered on 21 Jun 2011, 09:01 AM
Hi Karl,

You can use MinValue, MaxValue and Step properties in order to accomplish that.

Check out the following example:
radChart.PlotArea.YAxis.AutoScale = false;
radChart.PlotArea.YAxis.MinValue = 0;
radChart.PlotArea.YAxis.MaxValue = 50;
radChart.PlotArea.YAxis.Step = 10;

or you could use the AddRange method as well:
radChart.PlotArea.YAxis.AutoScale = false;
radChart.PlotArea.YAxis.AddRange(0, 50, 10);

Remember that AutoScale should be set to false in order to be able to set MinValue, MaxValue and Step values.

You can find more information regarding axis formatting here:
http://www.telerik.com/help/aspnet-ajax/radchart-axes.html
http://www.telerik.com/help/aspnet-ajax/radchart-axis-labels.html

Kind regards,
Peshito
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Chart (Obsolete)
Asked by
Karl
Top achievements
Rank 1
Answers by
Karl
Top achievements
Rank 1
Peshito
Telerik team
Share this question
or