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

ejChart X-Axis labels overlap

On the following picture you can see two charts -- the first one is displayed nicely while the other has overlapping labels on x-axis.
Is there any way to prevent from this and force the behaviour like on the first chart (i.e. x-data labels are automatically skipped)?

Thanks a lot
MichalM




3 Replies

SK Saravana Kumar Kanagavel Syncfusion Team June 6, 2016 08:40 AM UTC

Hi Michal,   
   
Thanks for contacting Syncfusion Support.   
  
We have analyzed your query and created a sample based on your requirement. To prevent the X-Axis labels overlapping please use “labelIntersectAction” property.   
   
Following values has to be given for “labelIntersectAction” property   
   
·       rotate90” – To rotate the axis labels in 90 degrees.   
·       rotate45” – To rotate the axis labels in 45 degrees.   
·       multipleRows” – If axis labels are overlapped then overlapped labels can be placed in second row.   
·       hide” – To hide the overlapping axis labels.   
·       trim” – To trim the overlapping axis labels and full text can be displayed by tooltip on hovering.   
·       wrap” – If axis labels are overlapped then overlapped letter only placed in next row.   
   
Please follow the code example below   
[JS]   
$(function ()   
    {   
        $("#container").ejChart(   
        {    
            primaryXAxis:   
            {   
                labelIntersectAction : "multipleRows"                             
            }   
        });   
    });   
  
   
   
   
And we have also made a sample for your reference and attached in the below location   
   
  
   
And please refer the UG link to know more details about label customization.   
   
   
Please find the output of the sample below   
   
     
 
Please let us know if you have concern.   
   
Regards,   
Saravana Kumar K.   



MM Michal Misler June 7, 2016 09:32 AM UTC

Hi,
  thanks a lot. Great help. I appreciate it.

MichalM


SK Saravana Kumar Kanagavel Syncfusion Team June 7, 2016 01:12 PM UTC

Hi Michal, 
 
Thanks for your update. 
 
Please let us know if you need further assistance on this. 
 
Regards, 
Saravana Kumar K. 


Loader.
Up arrow icon