Remove padding in google chart?

Ryan picture Ryan · Nov 24, 2010 · Viewed 23.7k times · Source

I'm wondering why google charts add a blank padding when not specifying the top/right/left axises.

alt text

Select the image and you'll find a huge padding except the bottom which is already filled & that's why, how to remove that?

Specifically, Talking about the right and left paddings.

Thank you.

Answer

CodeToad picture CodeToad · Oct 15, 2013

You can use the chartArea option as follows:

options.chartArea = { left: '8%', top: '8%', width: "70%", height: "70%"};

More documentation can be viewed here:

https://developers.google.com/chart/interactive/docs/gallery/piechart#Configuration_Options