Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

343
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda