Hello,
I am using the Table visualization and, I am unable to set the
background color of an entire row using setRowProperrty Using the
code playground I have tried the code below. I can set the background
color of a single cell easily enough but I can't set it for an entire
row. It seems that this should be possible, but I can't get it to
work.
Any help would be appreciated.
Thank you!
function drawVisualization() {
// Create and populate the data table.
var JSONObject = {
cols: [{id: 'task', label: 'Task', type: 'string'},
{id: 'hours', label: 'Hours per Day', type: 'number'}],
rows: [{c:[{v: 'Work', p: {'style': 'border: 7px solid
orange;'}}, {v: 11}]},
{c:[{v: 'Eat'}, {v: 2}]},
{c:[{v: 'Commute'}, {v: 2, f: '2.000'}]}]};
var data = new google.visualization.DataTable(JSONObject, 0.5);
//data.setProperty(1,1, 'style', 'background: yellow');
data.setRowProperty(1, 'style', 'background-color:#FF0000');
var formatter = new google.visualization.BarFormat({width: 120});
formatter.format(data, 1);
// Create and draw the visualization.
visualization = new
google.visualization.Table(document.getElementById('table'));
visualization.draw(data, {'allowHtml': true});
}
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.