Problem when MaxValue of AxisY is not divisible by Step.

2 posts, 0 answers
  1. Yaroslav
    Yaroslav avatar
    3 posts
    Member since:
    Mar 2011

    Posted 26 Jan 2012 Link to this post

    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.
  2. Peshito
    Peshito avatar
    524 posts

    Posted 31 Jan 2012 Link to this post


    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.

    the Telerik team

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

Back to Top