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

92
Vistas
Google Chart Bg color

I am trying to change the background of the piechart from white to black but am unable to change it ,checked on the internet but its specifically showing the color change of pie chart bars

The code

function drawChart(obj,total) {
        //   console.log(obj.online);
        if(total == 0){
            var data = google.visualization.arrayToDataTable([
                ['Task', 'Hours per Day'],
                ['Users: ' +0+'',15]
            
            ]);
        }
        else{
            if(obj.online != 0 && obj.offine != 0){
                var data = google.visualization.arrayToDataTable([
                    ['Task', 'Hours per Day'],
                    ['Online Users: '+obj.online+'',obj.online],
                    ['Offline Users: ' +obj.offline+'',obj.offline]
                
                ]);
            }
            else if(obj.online != 0 && obj.offine == 0){
                var data = google.visualization.arrayToDataTable([
                    ['Task', 'Hours per Day'],
                    ['Online Users: '+obj.online+'',obj.online],
                
                ]);
            }
            else{
                var data = google.visualization.arrayToDataTable([
                    ['Task', 'Hours per Day'],
                    ['Offline Users: ' +obj.offline+'',obj.offline]
                
                ]);
            }
        }
        
        
        var options = {
          title: 'Online Users',
          sliceVisibilityThreshold:0
        };

        var chart = new google.visualization.PieChart(document.getElementById('piechart'));

        chart.draw(data, options);
      }

Where should add the bg color?

any help would be highly appreciated

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