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

202
Vistas
Google Line Chart change the color by value variation

I'm using Google line chart. I want to change the graph color change by the vAxis tick variation. For example...

case 1 : 0 <= value <= 20 , color : blue(Of course RGB code will input)
case 1 : 20 <= value <= 40 , color : green
case 1 : 40 <= value <= 60 , color : yellow
case 1 : 60 <= value <= 80 , color : orange
case 1 : 80 <= value <= 100 , color : red

function drawGChart(data, color, id) {
            var options = {
              animation:{
                duration: 600,
              },
              curveType: 'function',
              fontSize: 11,
              
              hAxis: {
                  textStyle: {
                    fontSize: 11
                  }
                },
              legend: { position: 'none' },
              series: {
                  0: { color: color },
                }
            };

            var chart = new google.visualization.LineChart(document.getElementById(id));

            chart.draw(data, options);
       }

data form is ["timeseries", "value"]. Is there any option can help me? Or, should I use another chart library?

about 4 years ago · Juan Pablo Isaza
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