Hi,
I am struggling to get the setProperty method of DataTable to work to change font or color of a table cell (or anything in a table cell for that matter). See code below:
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
['Name', 'Height', 'Smokes'],
['Tong Ning mu', 174, true],
['Huang Ang fa', 523, false],
['Teng nu', 86, true]
]);
//data.setProperty(1, 1, "color", "red");
//data.setProperty(0, 1, "background-color", "blue");
//data.setProperty(2, 0, "style", "font-style:bold;");
data.setProperty(1, 1, 'style', 'background-color: red;');
// Create and draw the visualization.
visualization = new google.visualization.Table(document.getElementById('table'));
visualization.draw(data);
}
Code taken from Google Code Playground and edited.
Thanks.