Graph : Y - Axis label numbering in thousands and millions

6 posts, 0 answers
  1. Mahesh Babu
    Mahesh Babu avatar
    44 posts
    Member since:
    Jul 2009

    Posted 30 Dec 2015 Link to this post

    Hello

    I am using Graph component to display a bar series chart. Y-axis is using numerical scale to display the labels. I am struggling to find a way to display those numbers in thousands and millions.

     

    Ex:   100 -  100

             1000 - 1K

             10000 - 10K

        100000 - 100K

         1000000 - 1M

     

    Is there a way to do this?

    Please let me know.

     Thanks

    Mahesh

  2. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 30 Dec 2015 Link to this post

    Hello Mahesh,

    You can use the GraphAxis.LabelFormat property to apply a specific format to the axis labels.
    How to display a number in thousands or millions is described in this thread.

    Regards,
    Nasko
    Telerik
    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
  3. DevCraft banner
  4. Mahesh Babu
    Mahesh Babu avatar
    44 posts
    Member since:
    Jul 2009

    Posted 30 Dec 2015 in reply to Nasko Link to this post

    Thanks Nasko for the response!!

     The y-axis could have numbers in thousands and millions. I don't think I can use LabelFormat to have two different formats based on its value.

     Msahesh

  5. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 31 Dec 2015 Link to this post

    Hello Mahesh,

    You are correct. The LabelFormat property does not support expressions, which means that you can apply only a single format to the labels.

    Regards,
    Nasko
    Telerik
    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
  6. Jans
    Jans avatar
    3 posts
    Member since:
    Jun 2014

    Posted 13 May in reply to Nasko Link to this post

    I'm facing the same issue. Is there a workaround solution?
  7. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 14 May Link to this post

    Hello Francis,

    Axes labels can have only one format (LabelFormat).

    In case you have CategoryScale for an axis, labels are treated like strings and you can apply custom formatting via expression through the Graph.CategoryGroups.Label property. With CategoryScale there is no discrete step, there will be rendered a slot per label.

    Regards,
    Stef
    Telerik
    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
DevCraft banner