Google Chart Background Color

后端 未结 8 1162
北海茫月
北海茫月 2020-12-09 07:45

I\'m styling a google chart using the javascript api. I want to change the background of the area where the data is plotted. For some reason when I set background options li

相关标签:
8条回答
  • 2020-12-09 08:34

    add this to your options:

    'chartArea': {
        'backgroundColor': {
            'fill': '#F4F4F4',
            'opacity': 100
         },
     }
    
    0 讨论(0)
  • 2020-12-09 08:34

    You can do it just with CSS:

    #salesChart svg > rect {  /*#salesChart is ID of your google chart*/
        fill: #F4F4F4;
    }
    
    0 讨论(0)
提交回复
热议问题