Force chart max value display height

Thread is closed for posting
3 posts, 1 answers
  1. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 16 Jun 2011 Link to this post

    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. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 20 Jun 2011 Link to this post

    Anyone?
  3. Answer
    Peshito
    Admin
    Peshito avatar
    580 posts

    Posted 21 Jun 2011 Link to this post

    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.

Back to Top