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

Large labels in x-axis

Hi guys,

I'm having a issue with large labels in the x-axis, how are you solving it? I can't simply hide them cause they are too important for the business.

Is there some way to break label contents in multiple lines? 

7 Replies

SK Satheesh Kumar T Syncfusion Team December 11, 2014 01:24 PM UTC

Hi Paulo,
Thanks for using Syncfusion products.
We have analyzed your query. SfChart provide property called LabelsIntersectAction in axis, to decide whether overlapped axis labels should be hidden or arranged in multiple rows. By default its value is AxisLabelsIntersectAction.Hide. So the labels are hidden by default.

Please change it as like in the following code snippet.

Code snippet:
[C#]
categoryAxis.LabelsIntersectAction= AxisLabelsIntersectAction.MultipleRows;

We have prepared a sample based on this and please find the sample in the attachment.

Please let us know if you have any queries.

Thanks,
Satheesh Kumar T
Satheesh Kumar T

Attachment: ChartGettingStarted_a5fdf43c.zip


PO Paulo Ortins replied to Satheesh Kumar T December 11, 2014 02:03 PM UTC

Hi Paulo,
Thanks for using Syncfusion products.
We have analyzed your query. SfChart provide property called LabelsIntersectAction in axis, to decide whether overlapped axis labels should be hidden or arranged in multiple rows. By default its value is AxisLabelsIntersectAction.Hide. So the labels are hidden by default.

Please change it as like in the following code snippet.

Code snippet:
[C#]
categoryAxis.LabelsIntersectAction= AxisLabelsIntersectAction.MultipleRows;

We have prepared a sample based on this and please find the sample in the attachment.

Please let us know if you have any queries.

Thanks,
Satheesh Kumar T
Satheesh Kumar T

Attachment: ChartGettingStarted_a5fdf43c.zip

The issue with AxisLabelsIntersectAction.MultipleRows is that labels become too difficulty to read. The best solution would be to break each label in their own column.


Ex:
       1        4      7
       2        5      8
       3        6      9


SK Satheesh Kumar T Syncfusion Team December 12, 2014 04:43 AM UTC

Hi Paulo,

 

Thanks for using Syncfusion products.

 

We have analyzed your query. Currently we do not have text wrapping support for axis labels. Since this feature is not available in our product, we consider this to be a feature request. In the meantime you can use the LabelRotationAngle property in axis to avoid labels hidden while overlapping with each other.

 

Please refer the below code snippet.

 

[C#]

categoryAxis.LabelRotationAngle = 10;

 

Please let us know if you need further assistance on this.

 

Thanks,

Satheesh Kumar T



PO Paulo Ortins December 12, 2014 10:57 AM UTC

I solved it putting the labels inside the column and in a 90 angle. Until now, it's the best solution that I found.


SK Satheesh Kumar T Syncfusion Team December 15, 2014 09:10 AM UTC

Hi Paulo,

 

We are glad to know that the issue got fixed at your end.

 

Please let us know if you require further assistance, we are happy to assist you.

 

Thanks,

Satheesh Kumar T



NC Naveen C Ramachandrappa June 13, 2017 09:14 PM UTC

Is the wrap feature available now?


SP Saravana Pandian Murugan Syncfusion Team June 14, 2017 07:18 AM UTC

Hi Naveen,

Yes. You can achieve this requirement by splitting the XValue with “\n”. Please download the sample from the following location.

Sample: http://www.syncfusion.com/downloads/support/forum/117775/ze/MultilineAxisLabel1622719462

Could you please check the sample and update us with more details if your requirement is different or if you are facing any issues with this approach.

Regards,
Saravana Pandian M.


Loader.
Live Chat Icon For mobile
Up arrow icon