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

Axis data point rounding

2 Answers 55 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 2
Andrew asked on 13 Nov 2008, 07:56 PM
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.

Andrew

2 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 17 Nov 2008, 08:27 AM
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,
Manuel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Huxtable
Top achievements
Rank 1
answered on 25 Mar 2009, 02:33 AM
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.

David
Tags
Chart
Asked by
Andrew
Top achievements
Rank 2
Answers by
Giuseppe
Telerik team
David Huxtable
Top achievements
Rank 1
Share this question
or