private void YAxis_LabelCreated(object sender, Syncfusion.SfChart.XForms.ChartAxisLabelEventArgs e)
{
double value = Convert.ToDouble(e.LabelContent);
e.LabelContent = value.ToString("#,###.##", new CultureInfo("en-US"));
} |
Hi,
It works great.
Thank you!
Hi,
One more cuestion please. What about formatting "StackingBarSeries -> DataMarker" and "StackingBarSeries -> ToolTip" specifying the culture info?
Thanks.
<ResourceDictionary>
<local:DataMarkerConverter x:Key="labelConverter"></local:DataMarkerConverter>
<DataTemplate x:Key="LabelTemplate">
<StackLayout>
<Label Text="{Binding YValue, Converter={StaticResource labelConverter}"/>
</StackLayout>
</DataTemplate>
</ResourceDictionary>
|
public object Convert(object value, Type targetType, object parameter, CultureInfoculture)
{
double yValue = System.Convert.ToDouble(value);
return yValue.ToString("#,###.##", new CultureInfo("en-US"));
} |
Thank you. Could you please post the equivalent for C# code?
Works perfect.
Thank you for the excellent assistance.