Skip to content

Make the pie chart to take the whole space of the container

In order for the pie to take the whole width/height of the container you will need to:

  1. Disable callouts / labels;
  2. Set all margins to zero;
  3. Disable slice pullout functionality.

Like this:

chart.labelsEnabled = false;
chart.autoMargins = false;
chart.marginTop = 0;
chart.marginBottom = 0;
chart.marginLeft = 0;
chart.marginRight = 0;
chart.pullOutRadius = 0;

Or if you are using JSON config:

AmCharts.makeChart("chartdiv", {
...
labelsEnabled: false,
autoMargins: false,
marginTop: 0,
marginBottom: 0,
marginLeft: 0,
marginRight: 0,
pullOutRadius: 0,
...
});