To remove padding or margins from Google Charts with JavaScript, we set the width and height of the chart area.
For instance, we write
const options = {
title: "How Much Pizza I Ate",
width: 350,
height: 400,
chartArea: { width: "100%", height: "80%" },
legend: { position: "bottom" },
};
to set the chartArea
‘s width and height to match the actual width and height to remove any padding or margin from the chart.