We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Formatting PrimaryYAxis Label Value

How can I add comma formatting to the PrimaryYAxis label?

For example, I have a value "$2000", but I want it to read "$2,000".

I've tried 'MyChart.LabelFormat.PrimaryYAxis.LabelFormat = "$#,##0";'  but that throws an error.

Anyone have any ideas?

Thanks in advance!

1 Reply

PR Praveen Syncfusion Team April 17, 2015 08:13 AM UTC

Hi Mark,

Thanks for using Syncfusion product.

We can achieve your requirement by applying/setting c0 format in “LabelFormat” of PrimaryYaxis. The 'c0' format is numbers with a currency sign, thousand separators and zero decimal places.

The following code snippet shows this,



Screen Shot:

We have also made a sample to illustrate this. Kindly find it from the below location.


Please let us know if you have any concern.



Live Chat Icon For mobile
Up arrow icon