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

How to set a fixed axis label height

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

3 Replies

DA Devi Aruna Maharasi Murugan Syncfusion Team 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 






BE Bernd 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


DA Devi Aruna Maharasi Murugan Syncfusion Team October 10, 2016 04:23 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon