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

LabelFormat of SfChart Axis is not working with "### ### ### ##0.000".

It only used ",". When I using space character, it has been error

5 Replies

MK Muneesh Kumar G Syncfusion Team September 30, 2019 06:53 AM UTC

Hi Nguyen, 
 
Thanks for using Syncfusion products.  
 
We have analyzed your requirement and would like to explain you that in source level, we have used the DecimalFormat method to format the axis labels. So, given format of yours is not a correct one. Please refer the below link for supportable labels formats in android.  
 
Reference link –  
 
Code snippet [C#]: 
<chart:SfChart.SecondaryAxis> 
    <chart:NumericalAxis > 
        <chart:NumericalAxis.LabelStyle> 
            <chart:ChartAxisLabelStyle LabelFormat="###,###.###" /> 
        </chart:NumericalAxis.LabelStyle> 
    </chart:NumericalAxis> 
</chart:SfChart.SecondaryAxis> 
 
 
 
Screenshot: 
 
 
Or please provide the details on how you want to format the labels. Please get back to us for further assistance. 
 
Thanks, 
Muneesh Kumar G. 



NK Nguyen Khoa Lu September 30, 2019 09:37 AM UTC

Thanks for answer, now I want format the number: 123456789 to 123.456.789,00 How to?



MK Muneesh Kumar G Syncfusion Team October 3, 2019 08:58 AM UTC

Hi Nguyen, 
  
We have analysed your requirement and you can achieve this requirement by modifying the LabelContent in the LabelCreated event of ChartAxis. Please refer the below code. 
  
Code snippet[XAML]: 
<chart:SfChart.SecondaryAxis> 
    <chart:NumericalAxis LabelCreated="NumericalAxis_LabelCreated"> 
    </chart:NumericalAxis> 
</chart:SfChart.SecondaryAxis> 
  
Code snippet[C#]: 
private void NumericalAxis_LabelCreated(object sender, ChartAxisLabelEventArgs e) 
{ 
    double value = Convert.ToDouble(e.LabelContent); 
    e.LabelContent = value.ToString("C", new CultureInfo("vi-VN")); 
} 
  
  
Screenshot: 
 
  
 
Please let us know if you have any other queries.   
 
Thanks,  
Muneesh Kumar G. 
 



NK Nguyen Khoa Lu October 5, 2019 01:37 AM UTC

Thanks for your answer, I did it 3 day ago. Thanks again!


HM Hemalatha Marikumar Syncfusion Team October 7, 2019 06:23 AM UTC

Hi Nguyen, 
 
Thanks for your update.  
 
Please let us know if you need any further assistance. 
 
Regards,
Hemalatha M. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon