I've created a geo chart that shows the map of the US:
var data = google.visualization.arrayToDataTable(response.data.states);
var formatter = new google.visualization.NumberFormat({
pattern: '$###,###.##'
});
formatter.format(data, 1);
var options = {
region: 'US',
displayMode: 'regions',
resolution: 'provinces',
colorAxis: {
colors: ['#e6f4ff', '#008ffb', '#ff4560']
},
geochartVersion: 11,
legend: {
numberFormat: '$###,###.##'
},
};
var chart = new google.visualization.GeoChart(document.getElementById(='kt_charts_states'));
chart.draw(data, options);
Now this properly creates the chart and each states fill is based on a gradient scale from the colorAxis option. My questions is: How do you go about getting the specific fill color of a state / series? For example:
EDIT:
Here's some sample data that I'm using:
[
['State', 'Sales', 'Order Count'],
['Alabama', 5939.95, 6],
['Arizona', 5256.83, 9],
['Arkansas', 7917.89, 14],
['California', 24587.1, 37],
['Colorado', 7494.87, 8],
]