Remove padding or margins from Google Charts

前端 未结 6 1923
礼貌的吻别
礼貌的吻别 2020-12-12 13:45



        
6条回答
  •  佛祖请我去吃肉
    2020-12-12 13:56

    There's a theme available specifically for this

    options: {
      theme: 'maximized'
    }
    

    from the Google chart docs:

    Currently only one theme is available:

    'maximized' - Maximizes the area of the chart, and draws the legend and all of the labels inside the chart area. Sets the following options:

    chartArea: {width: '100%', height: '100%'},
    legend: {position: 'in'},
    titlePosition: 'in', axisTitlesPosition: 'in',
    hAxis: {textPosition: 'in'}, vAxis: {textPosition: 'in'}
    

提交回复
热议问题