Axis data point rounding

3 posts, 0 answers
  1. Andrew
    Andrew avatar
    30 posts
    Member since:
    Nov 2008

    Posted 13 Nov 2008 Link to this post

    I have a Y axis that is using tick labels like 1.4 then 1.59999999999999999, 1.799999999999999 etc.. Is there any way i can round the tick points to say 2 dp.

  2. Giuseppe
    Giuseppe avatar
    2363 posts

    Posted 17 Nov 2008 Link to this post

    Hi Andrew,

    We must admit this is a problem within the control but unfortunately we cannot suggest you a workaround at the moment. Our developers are aware of this issue and will fix it for the service pack release scheduled for the first half of December; also we will add options for label customization as well (content and formatting).

    Sorry for the temporary inconvenience.

    All the best,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. David Huxtable
    David Huxtable avatar
    14 posts
    Member since:
    Mar 2009

    Posted 24 Mar 2009 Link to this post

    Hi Andrew,

    I came across this issue this morning and in case you are still faced with this issue, this should fix it:

    RadChart1.DefaultView.ChartArea.AxisY.DefaultFormat = "{0:F2}";
    RadChart1.DefaultView.ChartArea.AxisX.DefaultFormat = "{0:F2}";

    Just in case you or anyone else reading is post are not aware, the number ar 'F' relates to the desired number of decimal places, so in this case 2.

    I hope this post helps.

Back to Top