Yup, same for columns.

On Friday, November 23, 2012 12:11:03 AM UTC-5, Ambientson wrote:
>
> Hmmm... found an answer on a previous post but for a row:
> <quote>The Table visualization doesn't use any row properties.  You have 
> to set the style property for each cell in the row.</quote>
>
> If it's the same thing for columns, it would explain it.
>
> Is it the same for columns?
>
> Thanks.
>
> On Thursday, November 22, 2012 11:58:21 PM UTC-5, Ambientson wrote:
>>
>> Actually, I had the allowHtml in my code but not in the example I 
>> provided. I think my issue is more related to setting properties on a 
>> column.
>>
>> The following statement works (as you pointed out):
>> data.setProperties(1, 1, {style: 'font-style:italic; font-size:10px;'});
>>
>> But not this one (which is the one in my current code):
>> data.setColumnProperties(1, {style: 'font-style:italic; 
>> font-size:10px;'});
>>
>> Any ideas why?
>>
>> I'm having a hard time finding information on which properties are 
>> supported for various elements (row, column, cell, etc.). My objective is 
>> to change the font of an entire column to make it smaller and in italic.
>>
>> Thanks.
>>
>> On Thursday, November 22, 2012 11:31:28 PM UTC-5, Ambientson wrote:
>>>
>>> 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/-/rYaDZeiVGrgJ.
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.

Reply via email to