Format Bug on Android

Hello,

I'm creating my series dynamically using this

TrendSeries.Add(new SplineAreaSeries()
            {
                ItemsSource = dataModels,
                XBindingPath = "Name",
                YBindingPath = "Value",
                Label = label.Equals(string.Empty) ? LocString.Total : label,
                DataMarker = new ChartDataMarker()
                {
                    LabelStyle = new DataMarkerLabelStyle()
                    {
                        LabelFormat = IsCurrency ? "C2" : "N0"
                    }
                },
                Opacity = 0.5,
                Color = colors[seriesNumber]
            });

And the Axis

SecondaryAxisVersus.LabelStyle.LabelFormat = "N0"; // Or C2 if is currency


In UWP and iOS it works fine, but in Android the values starts with "N0#####" or "C2#####" in both axis and data markers labels

5 Replies

DV Divya Venkatesan Syncfusion Team February 8, 2018 01:14 PM UTC

Hi Juan, 
 
Please set the LabelFormat as shown in the below code snippets so that it will work in all the platforms. 
 
LabelFormat = IsCurrency ? "$#" : "#" 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Divya Venkatesan 
 



JC Juan Carlos Gonzalez Salazar February 8, 2018 03:57 PM UTC

Hi Divya,

Is there a way to format the currency $# like C2, for example

100352 in C2 format is $100,352.00
100352 in $# format is just $100352

I need the 2 decimals and separate with commas the thousands


DV Divya Venkatesan Syncfusion Team February 9, 2018 09:03 AM UTC

Hi Juan,  
  
Please set the LabelFormat as shown in the below code snippets to format like “C2”. 
  
LabelFormat = "$0,000.00" 
 
   
Please let us know, if you need any further assistance.  
  
Regards,  
Divya Venkatesan 
 



JC Juan Carlos Gonzalez Salazar February 23, 2018 06:34 PM UTC

Thank you, now it's formatting it correctly 


DV Divya Venkatesan Syncfusion Team February 26, 2018 10:50 AM UTC

Hi Juan,

Thanks for the update. We are glad to know that the given solution works.

Please let us know if you need any further assistance.

Regards,
Divya Venkatesan

Loader.
Up arrow icon