Google embed api set chart background color -
i trying edit background colour of chart isnt working can edit background colour of full thing not chart area, code below
var sessions = { query: { dimensions: 'ga:date', metrics: 'ga:sessions' }, chart: { type: 'line', options: { width: '100%', title: 'sessions', titletextstyle: { color: '#0f55c4', fontsize: '16', bold: true } } } };
i have tried following combinations none have worked;
backgroundcolor: 'red', (changed background colour not chart colour) chartarea: { backgroundcolor:'red' } (again background colour only) chartarea: { backgroundcolor: { fill: 'red' } } (again background colour only) chartarea: { fill: 'red' } (doesn't work)
not sure else can try i've tried can find in documentation , several sites nothing seams work goes onto whole background not chart area, appreciated.
thanks.
according documentation you're able change background color , backgroundcolor of chartarea.
i'm able change both of these colors following option:
var options = { backgroundcolor: '#ccc', chartarea: { backgroundcolor:'#e5e5e5' } };
sadly i'm not familiar way have arranged options , such, guess should place option within
options: { width: '100%', ..... chartarea: { backgroundcolor:'#e5e5e5' } ....... };
i hope helps out!
Comments
Post a Comment