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

153
Views
Add separate colour to the selected column of Google Column chart

I'm passing selectedUser as a parameter to this function. This graph is dynamically generated based on the value of data that is passed to this function. I want to add separate colour to the column that is selected from a dropdown which will be mapped to the parameter selectedUser. I'm not able to pass the index of the array also.

function drawAccountBarChart(data,selectedUser){
    var arr = [["Accounts","Account Percentage"]];
    for(i=0;i<data.length;i++){
        arr.push([data[i].map.ACCOUNT,data[i].map.ACCOUNT_EOL_PER]);
    }
    var data = google.visualization.arrayToDataTable(arr);  
    var options = {
        title: 'Accounts Percentage',
        isStacked : false,
        explorer: { axis: 'horizontal' },
        colors: ['#00a1de'],
    };
    
    var chart = new google.visualization.ColumnChart(document.getElementById('accountsBar'));   
    chart.draw(data, options);
}
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!