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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Axis label text alignment

Thread ID:





103071 Mar 28,2012 10:18 AM UTC Apr 18,2012 03:59 PM UTC WPF 2
Tags: Chart
Asked On March 28, 2012 10:18 AM UTC


We use a custom template to display axes label. We have implemented the rotation for these labels. The alignment was working fine in But in, the labels are always centered by default (see pictures inclosed within). We tried to use the property LabelHorizontalAlignment of the ChartAxis. But it doesn't work if the property LabelWidth is not set. As labels have unknown size (extraction from a cube), it is not easy to set LabelWidth.
Is there any way to have the behavior of the in 10 ? Or can we make LabelHorizontalAlignment work without LabelWidth ?


Olivier Vayssié


Replied On April 13, 2012 06:52 AM UTC

Well, in the end we used a TranslateTransform on the textblock displaying the labels, using converters for X and Y moving the text of text width/2

Michael Prabhu M [Syncfusion]
Replied On April 18, 2012 03:59 PM UTC

Hi Olivier,

Thanks for the udpate and sorry for the delay in getting back at this. Since we have added some new features like Label Prefix and Postfix for axis label the labels are centered by default.

We are glad that your issue is resolved.

Please let us know if you have any queries.

Michael Prabhu.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon