I've been exploring the features of google charts and now I'm trying to customize a scatter chart. I got the following function:
function drawScatterChart(){
var data = google.visualization.arrayToDataTable([
['Chance', 'Impact'],
[ 5, 4],
[ 1, 2]
]);
var options = {
hAxis: {title: 'Chance', minValue: 0, maxValue: 5},
vAxis: {title: 'Impact', minValue: 0, maxValue: 5},
legend: 'none',
'chartArea' : { 'backgroundColor' : '#F4F4F4' }
};
var chart = new google.visualization.ScatterChart(document.getElementById('scatter_chart'));
chart.draw(data, options);
}
This succesfully changes the background color of only the chartArea to gray, which is great. But now I'd like to implement a gradient that goes from the left bottom to the top right of the chart and containing 3 colors (green to yellow to red).
Is there any way to hack this into the chart since I've been trying to find anything in the documentation and only could find some old documentation (namely: https://developers.google.com/chart/image/docs/chart_params) but couldn't find a way to implement this.
Thanks!