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

Spacing around chart

Thread ID:





125987 Sep 15,2016 08:56 PM UTC Sep 16,2016 10:12 AM UTC JavaScript 1
Tags: ejChart
Joshua Rice
Asked On September 15, 2016 08:56 PM UTC


I am wondering how you remove ALL space around the chart. The chart I created is a Doughnut type, but even with the legend turned off, the chart only takes up about 50% of its area.
When I inspect the elements, the element in question seems to be "savingsChart_svg_SvgRect" and the actual graph is "savingsChart_svg_SeriesCollection".
Is there anyway to make the chart take up full space? I've already set the width to 100% and isResponsive is true.


Saravana Kumar Kanagavel [Syncfusion]
Replied On September 16, 2016 10:12 AM UTC

Hi Joshua, 
Thanks for contacting Syncfusion Support. 
We have analyzed your query and created a sample based on your requirement. And we would like to inform that pie and doughnut chart rendering based on its calculation of proportional ratio by specified height and width to the chart. So if you wish to remove the space on around the chart, then please refer the code example below. 
            elementSpacing: 0,   // you can remove the space by based on specified value 
            margin: { left: 0, right: 0, top: 0, bottom: 0 }, 
            doughnutSize: 1,  
            size: { height: "500", width: "500" } //You should set the same size for height and width 
In the above code, we have removed the space on around the chart by using above API’s and also you should specify the doughnut size as 1. 
And you can find the sample from the below location. 
Now, doughnut chart has been rendered without spacing. 
Please fin the outputs of the sample below 
Please let us know if you have concern. 
Saravana Kumar K 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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