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. Image for the cookie policy date

Axis title position

Hello, is it possible to change the axis title position? I didn't find anything related in the documentation.
Something like this:

Thanks in advance

1 Reply

BK Bharathiraja K Syncfusion Team June 13, 2019 11:12 AM UTC

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. 
<chart:NumericalAxis x:Name="XAxis" LabelCreated="LabelCreated" EdgeLabelsVisibilityMode="AlwaysVisible" EdgeLabelsDrawingMode="Fit" Minimum="0" Maximum="24" Interval="3" ShowMajorGridLines="False" ShowMinorGridLines="False"> 
. . .                     
[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. 

Live Chat Icon For mobile
Up arrow icon