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.
Unfortunately, activation email could not send to your email. Please try again.

LabelFormat string inconsistent across platforms

Thread ID:

Created:

Updated:

Platform:

Replies:

117618 Nov 17,2014 10:04 AM Nov 18,2014 01:53 AM Xamarin.Forms 1
loading
Tags: SfChart
Steen Steiniche
Asked On November 17, 2014 10:04 AM

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

Suresh B [Syncfusion]
Replied On November 18, 2014 01:53 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;