Hi Pablo,
Greetings. Currently we don’t have support to customize the axis title position. Instead of axis title, we can achieve your requirement by using axis label created event to add the text like the given image.
[XAML]
<chart:NumericalAxis x:Name="XAxis" LabelCreated="LabelCreated" EdgeLabelsVisibilityMode="AlwaysVisible" EdgeLabelsDrawingMode="Fit" Minimum="0" Maximum="24" Interval="3" ShowMajorGridLines="False" ShowMinorGridLines="False">
. . .
</chart:NumericalAxis> |
[C#] Changing the final label content
private void LabelCreated(object sender, ChartAxisLabelEventArgs e)
{
var axis = sender as NumericalAxis;
if(axis == chart.SecondaryAxis && e.Position == axis.Maximum)
{
e.LabelContent = "KWh";
e.LabelStyle = new ChartAxisLabelStyle() { FontAttributes = FontAttributes.Bold };
}
else if(axis == chart.PrimaryAxis && e.Position == axis.Maximum)
{
e.LabelContent += "h";
e.LabelStyle = new ChartAxisLabelStyle() { FontAttributes = FontAttributes.Bold };
}
} |
To know more about Label created event please refer the below link.
We have prepared the sample that can be downloaded from below link.
Regards,
Bharathi.