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

Problem when MaxValue of AxisY is not divisible by Step.

1 Answer 33 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Yaroslav
Top achievements
Rank 1
Yaroslav asked on 26 Jan 2012, 12:41 PM
I have the following code:
AxisY axisY = chart.DefaultView.ChartArea.AxisY;
 
maxValue = 360000;
step = 40000;
 
// without this line it works
maxValue *= 1.05;
 
axisY.AutoRange = false;
axisY.AddRange(0, maxValue, step);
 
foreach (TickPoint tickPoint in axisY.TickPoints)
{
tickPoint.Label = (tickPoint.Value) + "some text";
}

Tick point label is not generated as expected when MaxValue of AxisY is not divisible by Step.

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 31 Jan 2012, 08:54 AM
Hi,

When the axis max value is not divisible by the step value the last axis label which is the max value as well, is not drown because this is the expected behavior. In case you would like to see the last axis label, you will have to set appropriate step value. You can find more information about the axes behavior here.

Greetings,
Peshito
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
Yaroslav
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or