LabelFormat string inconsistent across platforms

When using the LabelStyle.LabelFormat string to format values in chart labels, the result is not consistent across platforms. For example, I have tried the following:

ChartDataMarker dataMarker = new ChartDataMarker();
dataMarker.LabelStyle.LabelFormat = "N1"

On Windows Phone, a value of, say, 16.4993 gives the result "16.5". On Android, however, the result is "N16". I have not tried on iOS.

What format strings must I use to have a consistent output across platforms?

Thanks

1 Reply

SB Suresh B Syncfusion Team November 18, 2014 06:53 AM UTC

Hi Steen,

We have analyzed your requirement and you can achieve this by using the below code snippet to set the consistent LabelFormat for all the platform.

Code snippet [C#]:

Label Format:
dataMarker.LabelStyle.LabelFormat = "#,###.##";

We have prepared a sample based on this. Please find the sample in the following location.

http://www.syncfusion.com/downloads/support/directtrac/general/ChartSample192348583.zip

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

Thanks,
Suresh B


Loader.
Up arrow icon