
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
9 Answers, 1 is accepted
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

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
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

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

Hi, Even am facing the same Issue. Is there any solution in the updated version???
Thanks & Regards,
Mano
The information in my previous post is still valid. Please use the suggested custom expression in case of a CategoryScale.
Regards,
Stef
Telerik by Progress

Hello,
Thanks for the response. But am not using CategoryScale, am using NumericalScale as YAxis, so how i can make customized in NumericalScale?
The LabelFormat for a numeric scale will be one for all labels. Please use the feedback portal to log a feature request for having a label format per label and to include details about the use case.
Regards,
Stef
Telerik by Progress