I'm wondering why google charts add a blank padding when not specifying the top/right/left axises.
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.
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
When using the Google Chart API you can eliminate the padding. I made an example Here.
The relevant parameter is chma.
According to the documentation:
You can specify the size of the chart's margins, in pixels. Margins are calculated inward from the specified chart size (chs); increasing the margin size does not increase the total chart size, but rather shrinks the chart area, if necessary.
You can try these parameters online in the Chart Playground HERE.
HTH!
Edit: Warning from Google
Important: The Image Charts portion of Google Chart Tools has been officially deprecated as of April 20, 2012. It will continue to work as per our deprecation policy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With