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

Remove Y axis labels space

Hello,

Is it possible to remove all the space at the left of the chart where normally there are the labels of the Y axis, and expand the chart in all the space available?

I have hidden the Y labels like this:

<e-chart-primaryyaxis>
     <e-labelstyle color="transparent"></e-labelstyle>
     <e-majorgridlines width="0"></e-majorgridlines>
     <e-majorticklines width="0"></e-majorticklines>
     <e-linestyle width="0"></e-linestyle>
</e-chart-primaryyaxis>

In the attachments there is an image that better explains which is the white space I would like to remove.

Thank you

Attachment: Chart_6b1670e0.zip

3 Replies

KM Kesavan Muthusamy Syncfusion Team January 31, 2020 08:48 AM UTC

Hi Fabrizio, 
 
Greetings from Syncfusion. 

We have looked up query. For hiding the axis labels from the chart, you can set axis’s label size to zero pixel instead of setting transparency to the labels. This will be helpful to you to remove the unnecessary space behind the axis.  

Code snippet:  
Index.cshtml 
 
<ejs-chart id="container"> 
  <e-chart-primaryyaxis> 
      <e-labelstyle size="0px"/> 
  </e-chart-primaryyaxis>   
 
  //other config 
</ejs-chart> 

Screenshot: 
 

We have attached sample link with this. 

Please let us know if you have any concerns about this. 


Regards, 
Kesavan 



FA Fabrizio Alessandro January 31, 2020 04:01 PM UTC

Thank you this is what I needed!


SM Srihari Muthukaruppan Syncfusion Team February 3, 2020 06:15 AM UTC

Hi Fabrizio,  

Most welcome. Kindly get in touch with us, if you requires further assistance. We are always happy in assisting you.   
   
Thanks,   
Srihari M 
 


Loader.
Up arrow icon