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

How to make the Y axis to show only integer numbers?

2 Answers 490 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Di
Top achievements
Rank 1
Di asked on 19 Jul 2013, 08:19 PM
I have a RadCartesianChart and within it has some LineSeries. The LineSeries will be created dynamically, and therefore there's no way to know what the data will be.
But I need the Y axis to show only integer numbers, even if the data are float points.

Di.

2 Answers, 1 is accepted

Sort by
0
Accepted
Petar Kirov
Telerik team
answered on 24 Jul 2013, 10:36 AM
Hi Di,

You can use the LabelFormat property of the axis to specify how values should be formatted. You can specify any standard or custom numeric format support by the .NET framework.

Setting the property to for example "F2" should make the axis display only integers. Please note that if all your data points are between 0.0 and 1.0, instead of getting 0.0, 0.2, 0.4, 0.6, 0.8, 1.0 and 1.2, you will get 0, 0, 0, 1, 1, 1 and 1. 

I hope this was helpful.
 
Regards,
Petar Kirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Di
Top achievements
Rank 1
answered on 24 Jul 2013, 12:45 PM
Thanks, I used LabelFormat="####".
Tags
ChartView
Asked by
Di
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Di
Top achievements
Rank 1
Share this question
or