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

3 posts, 1 answers
  1. Di
    Di avatar
    16 posts
    Member since:
    Jul 2013

    Posted 19 Jul 2013 Link to this post

    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. Answer
    Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 24 Jul 2013 Link to this post

    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 >>
  3. DevCraft banner
  4. Di
    Di avatar
    16 posts
    Member since:
    Jul 2013

    Posted 24 Jul 2013 Link to this post

    Thanks, I used LabelFormat="####".
Back to Top