Show integer value instead of double in Numerical Axis

2 posts, 0 answers
  1. Prava kafle
    Prava kafle avatar
    217 posts
    Member since:
    Apr 2010

    Posted 12 Oct 2016 Link to this post


    I would like to show integer  instead of double  as a label for y-axis in Numerical Axis of 
    RadCartesianChart . Chart is dynamically created and added to a stack. Is there any  chart property that can modify data shown in y-axis?




  2. Lance | Manager Technical Support
    Lance | Manager Technical Support avatar
    1193 posts

    Posted 13 Oct 2016 Link to this post

    Hi Prava,

    You can use the Axis's LabelFormat property to apply a string format to the tick value. Go here to see available label properties and another example of setting LabelFormat per-platform).

    Here is an example:

    axis.LabelFormat = "N2";

    In your case, you might want to use the N0 format (number with no decimal places). To learn more about numerical string formats, go here for MSDN docs or here for Xamarin docs.

    If you have any further difficulty with this please let us know. Thank you for contacting Support and for choosing Telerik by Progress.

    Lance | Tech Support Engineer, Sr.
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top