5
votes

Here's a google chart I've made:

enter image description here

I want the legend paging gone. On page 2 there are only 2 items, and obviously these 2 items could easily fit without paging.

After spending some time researching and playing around, it seems my only options are:

  1. Make the chart area higher - It's already too big
  2. Make the text smaller - It's already too small
  3. Hide the legend and make my own - This is my last resort

Does anyone know how I can modify the legend height to fit the other 2 items?

2

2 Answers

4
votes

It looks like you have extra vertical space at the bottom of the chart that you could use to expand the chartArea into:

chartArea: {
    height: '85%',
    top: '13%'
}

If that is not a viable solution, your only choice is to build a custom legend, as the API does not support altering the dimensions of the legend directly.

5
votes

Paging is gone only when legend.position is 'top' and give legend.maxLines: legend:{ position:'top',maxLines:4}

https://developers.google.com/chart/interactive/docs/gallery/piechart?csw=1#Configuration_Options