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

Using this label format when I have negative values, the chart doesn't show "-" character before the number.

<xForms:NumericalAxis.LabelStyle >

<xForms:ChartAxisLabelStyle TextColor="DarkGray" LabelFormat="########.#####"/>

</xForms:NumericalAxis.LabelStyle>

How it looks on iOS:

5.PNG


3 Replies

YP Yuvaraj Palanisamy Syncfusion Team June 25, 2021 02:02 PM UTC

Hi Lolo, 
 
Greetings from Syncfusion support.  
 
We would like to let you know that the provided label format is working fine in all platforms, check the below images with two different formats.  
  
<chart:NumericalAxis.LabelStyle> 
    <chart:ChartAxisLabelStyle LabelFormat="#######.#####"/> 
</chart:NumericalAxis.LabelStyle> 
 
<chart:NumericalAxis.LabelStyle> 
    <chart:ChartAxisLabelStyle FontSize="18" LabelFormat="+0;-#"/> 
</chart:NumericalAxis.LabelStyle> 
 
 
And we suspect that you have configured any culture, and the culture ignores the “-” values. If so, we can format individual labels at LabelCreated event. Check the below guidelines and let us know your concern.  
 
 
Regards, 
Yuvaraj 



LR Lolo Rodri June 28, 2021 08:50 AM UTC

Good morning Yuvaraj,

I tried LabelFormat="#######.#####;-#######.#####" and it works! Looks like for iOS you have to specific format for positive and negative values, if you don't that format will be applied for both, deleting "-" character for negative. So strange but funny to learn


Thank you very much!



YP Yuvaraj Palanisamy Syncfusion Team June 29, 2021 06:00 AM UTC

Hi Lolo, 
 
Thank you for your update.  
 
Please let us know if you have any concern. 
 
Regards, 
Yuvaraj. 


Loader.
Up arrow icon