BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<chart:SfChart.SecondaryAxis>
<chart:NumericalAxis>
<chart:NumericalAxis.LabelStyle>
<chart:ChartAxisLabelStyle x:Name="axis" LabelFormat="{OnPlatform UWP='#,0,K'}" />
</chart:NumericalAxis.LabelStyle>
</chart:NumericalAxis>
</chart:SfChart.SecondaryAxis> |
<chart:SfChart.SecondaryAxis>
<chart:NumericalAxis LabelCreated="SecondaryAxis_LabelCreated">
</chart:NumericalAxis>
</chart:SfChart.SecondaryAxis> |
private void SecondaryAxis_LabelCreated(object sender, ChartAxisLabelEventArgs e)
{
double position = e.Position;
if (!double.IsNaN(position))
{
if (position < 1000000)
{
//Thousands format
e.LabelContent = position.ToString("#,K");
}
else if (e.Position < 1000000000)
{
//Millions format
e.LabelContent = position.ToString("#,,M");
}
else
{
//Millions format
e.LabelContent = position.ToString("#,,,.00B");
}
}
} |
<chart:SfChart.SecondaryAxis>
<local:NumericalAxisExt/>
</chart:SfChart.SecondaryAxis> |
public class NumericalAxisExt : NumericalAxis
{
protected override void OnCreateLabels()
{
base.OnCreateLabels();
foreach (var item in VisibleLabels)
{
item.LabelContent = item.Position.ToString("#,K");
}
}
} |