Thanks, I hadn't noticed that.
Cheers.
On Thursday, November 22, 2012 10:01:20 PM UTC-5, asgallant wrote:
>
> You need to set the "allowHtml" option to true, eg:
>
> visualization.draw(data, {
> allowHtml: true
> });
>
> On Thursday, November 22, 2012 8:00:51 PM UTC-5, Ambientson wrote:
>>
>> 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.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/EsSU0BoY-joJ.
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.