Is there a way to change the entire background color of the header row (and rows) in Google Charts?
In the docs they said you can do it using:
dataTable.setCell(22, 2, 15, 'Fifteen', {style: 'font-style:bold; font-size:22px;'});
But I need to dinamicly change the color, according to some values I get from the database using PHP.
Currently this is my working code (without changing any styles)
var data = new google.visualization.DataTable();
<?php foreach($table['TITLES'] as $title) { ?>
data.addColumn('string', '<?php echo $title['TITLE_TEXT']; ?>');
<?php } ?>
<?php foreach($table['ROWS'] as $row) {
$cols = "";
foreach($row['COLS'] as $col)
$cols .= "'".$col['VALUE']."',";
$cols = rtrim($cols,",");
?>
data.addRow([<?php echo $cols; ?>]);
<?php } ?>
var table = new google.visualization.Table(document.getElementById('chart_div_<?php echo $item; ?>'));
table.draw(data, {showRowNumber: true});
Any help would by appreciated!