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

Y-Axis Lable Problems

1 Answer 108 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 08 Mar 2011, 10:42 PM
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!

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 11 Mar 2011, 09:06 AM
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!
Tags
Chart (Obsolete)
Asked by
Markus
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or