Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

341
Views
Google Geo Chart: Get fill color of a specific series

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:

enter image description here

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],
]
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!