Y-Axis Lable Problems

Thread is closed for posting
2 posts, 0 answers
  1. Markus
    Markus avatar
    1 posts
    Member since:
    Dec 2010

    Posted 08 Mar 2011 Link to this post

    Hi there,
    i have a chart with a line series where all values are 0,030. When I plot the chart with AutoScale set to true, the YAxis reaches from -50 to 40. To avoid this is set AutoScale = false, objChart.PlotArea.YAxis2.MinValue = 0 and objChart.PlotArea.YAxis2.MaxValue = 0.18.
    But than I only get one Label at 0.00.

    How can i get a second value to the y-axis2 like 0.1?

    Best regards!
  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 11 Mar 2011 Link to this post

    Hello Markus,

    You will also need to set the Step property. Unfortunately, there is a problem with the minor gridlines when the step does not fit exactly in the min-max interval (like min=0, max=0.18, step=0.1). So you can either configure the axis with max = 0.2:

    RadChart1.PlotArea.YAxis2.AutoScale = false;
    RadChart1.PlotArea.YAxis2.MinValue = 0;
    RadChart1.PlotArea.YAxis2.MaxValue = 0.2;
    RadChart1.PlotArea.YAxis2.Step = 0.1;

    or use the major gridlines and hide some of the labels like this:

    RadChart1.PlotArea.YAxis2.AutoScale = false;
    RadChart1.PlotArea.YAxis2.MinValue = 0;
    RadChart1.PlotArea.YAxis2.MaxValue = 0.18;
    RadChart1.PlotArea.YAxis2.Step = 0.02;
    RadChart1.PlotArea.YAxis2.Appearance.MinorTick.MinorTickCount = 0;
    RadChart1.PlotArea.YAxis2.LabelStep = 5;

    Best regards,
    Ves
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top