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);
}