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

Thousand separator for NumericalAxis

Dear 

I want to have a thousand separator for the NumericalAxis (so "5000" should become "5 000", "1234567" should become "1 234 567")
The example from your demo code "$####" is kind of working because it only adds a dolar sign before the number.  
However, the default formats that do work on C# doesn't seem to have any impact on the axis labels:

Attempt 1
<chart:NumericalAxis.LabelStyle>
             <chart:ChartAxisLabelStyle LabelFormat="0:n0" />
           </chart:NumericalAxis.LabelStyle>
Attempt 2
<chart:NumericalAxis.LabelStyle>
             <chart:ChartAxisLabelStyle LabelFormat="{0:n0}" />
           </chart:NumericalAxis.LabelStyle>

Can you please provide me an example?

Kind regards

1 Reply

MK Magesh Kumar Krishnan Syncfusion Team April 8, 2015 06:32 AM UTC

Hi Danny,

Thanks for using Syncfusion products.

We are glad to let you know that your requirement can be achieved by using LabelCreated event in ChartAxis.
LabelCreated event can also use to format the individual label in the Axis. We have prepared a sample based on your requirement. Please find the sample in the below location.

Sample: http://www.syncfusion.com/downloads/support/forum/118749/ChartSample_LabelFormat-2131747634.zip

Please let us know if you require further assistance on this.

Thanks,
Magesh Kumar K

Loader.
Live Chat Icon For mobile
Up arrow icon