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

89
Views
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
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!