Thanks for providing the correct syntax on the 2nd line (I already had the
first line). Virtually all the other examples and documentation talk about
setting the "p" property to {'html': true}, which is clearly not accurate.


On Sun, Nov 10, 2013 at 5:37 PM, asgallant <drew_gall...@abtassoc.com>wrote:

> In order to use the custom tooltips, you have to set the proper column
> role for the tooltip column.  Given your code as-is, add these lines after
> creating the DataTable but before drawing the chart:
>
> data.setColumnProperty(4, 'role', 'tooltip');
> data.setColumnProperty(4, 'html', true);
>
>
> On Sunday, November 10, 2013 5:42:50 PM UTC-5, Tim Johnson wrote:
>>
>> I paste this into the Playground and I get raw text "<div>my text</div>",
>> not the HTML version I was expecting. What am I doing wrong?
>>
>> function drawVisualization() {
>>   // Create and populate the data table.
>>   var data = google.visualization.arrayToDataTable([
>>     ['Year', 'Austria', 'Bulgaria', 'Denmark', 'Tooltip'],
>>     ['2003',  1400360,    1400361,    1400362,   '<div>THIS IS IT</div>']
>> ,
>>   ]);
>>
>>   data.setColumnProperty(4, 'role', 'tooltip');
>>   data.setColumnProperty(4, 'p', {'html': true});
>>
>>   // Create and draw the visualization.
>>   new google.visualization.ColumnChart(document.getElementById('
>> visualization')).
>>       draw(data,
>>            {title:"Yearly Coffee Consumption by Country",
>>             tooltip: {isHtml: true},
>>             width:600, height:400, legend:{position: "none"},
>>             vAxis: {title: "Year"},
>>             hAxis: {title: "Cups"}}
>>       );
>> }
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Visualization API" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-visualization-api/mnWmVkYkBVY/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Tim

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to