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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set a fixed axis label height

Thread ID:

Created:

Updated:

Platform:

Replies:

126300 Oct 6,2016 11:13 AM UTC Oct 10,2016 04:23 AM UTC WPF 3
loading
Tags: SfChart
Bernd
Asked On October 6, 2016 11:13 AM UTC

Hi,

I have a chart with LabelRotationAngle="45" and EnableScrollBar="True". Actutally the labels have different length's and due to the rotation different heights.

It appears that the height of the axis label area is automatically calculated based on the size of the visible labels. This leads to an ugly effect when scrolling. The X axis then is relocated (up and down).

How can I avoid this?

I already tried to set the Height property but with no effect.

Regards
Bernd

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On October 7, 2016 08:40 AM UTC

Hi Bernd, 
  
Thanks for contacting Syncfusion Support. 
  
We can avoid the reported problem by using LabelExtent property of axis. The axis panel will take LabelExtent value as its height when axis label size is lesser than the LabelExtent value. Please find the code snippet to set LabelExtent property of axis, 
  
 
<chart:CategoryAxis LabelExtent="100" /> 
  
  
We have prepared a demo sample based on your requirement and it can be downloaded from below link, 
Sample: LabelExtent 
  
Please find our UG documentation link to know more about LabelExtent property of axis 
  
Regards, 
Devi 





Bernd
Replied On October 7, 2016 09:06 AM UTC

Devi,

that's been it. This solved my problem.

I read the documentation but I never realized LabelExtent would address my issue.

Thank you for your support.

Regards
Bernd

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On October 10, 2016 04:23 AM UTC

Hi Bernd, 
  
Thanks for your update. 
  
Please contact us, if you need any further assistance. 
  
Regards, 
Devi 


CONFIRMATION

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.

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

;