Using that method, it is just a tooltip.

On Monday, August 12, 2013 6:34:54 PM UTC-4, Steven Brooks wrote:
>
> Would the column become solely a tooltip or will its be a tooltip as well 
> as data that will be displayed in the column?
>
> Steven Brooks
>
>
> Sent from my iPhone
>
>
>
>
>
> On Aug 12, 2013, at 6:05 PM, asgallant <[email protected]<javascript:>> 
> wrote:
>
> You need to call that before you draw the chart.  For organization 
> purposes, I would call it immediately after creating the DataTable:
>
> var data = google.visualization.arrayToDataTable(graph);
> data.setColumnProperty (1, 'role', 'tooltip');
>
> On Monday, August 12, 2013 5:47:47 PM UTC-4, Steven Brooks wrote:
>>
>> Where exactly do you place the :
>>
>> data.setColumnProperty(2, 'role', 'tooltip'); ?
>>
>> My code looks like this: 
>>
>> google.load("visualization", "1", {packages:["corechart"]});
>> google.setOnLoadCallback(drawChart);
>> function drawChart() {
>>   var data = google.visualization.arrayToDataTable(graph);
>>
>>   var options = {
>>     title: 'Your Workout',
>>     hAxis: {title: 'Exercises'},
>>     vAxis: {title: 'Total Weight (pounds)'}
>>   };
>>
>>   var chart = new 
>> google.visualization.ColumnChart(document.getElementById('chart_div'));
>>   chart.draw(data, options);
>>   data.setColumnProperty (1, 'role', 'tooltip');
>> }
>>
>> and I figured I would add that line of code at the end since this is 
>> after the tableis created.  It is not showing the information in column 1 
>> as the tooltip.
>>
>> On Wednesday, July 17, 2013 3:21:46 PM UTC-4, asgallant wrote:
>>>
>>> You can't assign column roles in the #arrayToDataTable method - if you 
>>> need to use that method, then the way to handle this is to assign the 
>>> column role after the DataTable is created:
>>>
>>> data.setColumnProperty(2, 'role', 'tooltip');
>>>
>>> On Wednesday, July 17, 2013 3:04:20 PM UTC-4, sgnv wrote:
>>>>
>>>> I have been trying to display tooltip on my chart can you please let me 
>>>> know if you have any suggestions..
>>>>
>>>> <script type="text/javascript" src="https://www.google.com/jsapi";></script>
>>>>     <script type="text/javascript">
>>>>       google.load("visualization", "1", {packages:["corechart"]});
>>>>       google.setOnLoadCallback(drawChart);
>>>>       function drawChart() {
>>>>        var data = google.visualization.arrayToDataTable([['Month', 
>>>> 'Usage','Name' role:'tooltip'],['Aug', 0, '<UsageHistoryDetail 
>>>> SortOrder="1" Quantity="0" ServiceMonthAndYear="8-2012" />
>>>> '],['Sep', 1, '<UsageHistoryDetail SortOrder="2" Quantity="1" 
>>>> ServiceMonthAndYear="9-2012" />
>>>> '],['Oct', 2, '<UsageHistoryDetail SortOrder="3" Quantity="2" 
>>>> ServiceMonthAndYear="10-2012" />
>>>> '],['Nov', 122, '<UsageHistoryDetail SortOrder="4" Quantity="122" 
>>>> ServiceMonthAndYear="11-2012" />
>>>> '],['Dec', 165, '<UsageHistoryDetail SortOrder="5" Quantity="165" 
>>>> ServiceMonthAndYear="12-2012" />
>>>> '],['Jan', 193, '<UsageHistoryDetail SortOrder="6" Quantity="193" 
>>>> ServiceMonthAndYear="1-2013" />
>>>> '],['Feb', 235, '<UsageHistoryDetail SortOrder="7" Quantity="235" 
>>>> ServiceMonthAndYear="2-2013" />
>>>> '],['Mar', 177, '<UsageHistoryDetail SortOrder="8" Quantity="177" 
>>>> ServiceMonthAndYear="3-2013" />
>>>> '],['Apr', 100, '<UsageHistoryDetail SortOrder="9" Quantity="100" 
>>>> ServiceMonthAndYear="4-2013" />
>>>> '],['May', 38, '<UsageHistoryDetail SortOrder="10" Quantity="38" 
>>>> ServiceMonthAndYear="5-2013" />
>>>> '],['Jun', 3, '<UsageHistoryDetail SortOrder="11" Quantity="3" 
>>>> ServiceMonthAndYear="6-2013" />
>>>> '] ]);;       
>>>>               data.setColumnProperty(2, 'role', 'tooltip');
>>>>          var options = {            
>>>>           title: '',
>>>>           hAxis: {title: '', titleTextStyle: {color: 'red'}},
>>>>           backgroundColor:'#E5E5E5',
>>>>           colors: ['#E37125']     
>>>>             };        
>>>>          var chart = new 
>>>> google.visualization.ColumnChart(document.getElementById('chart_div'));
>>>>         chart.draw(data,options);
>>>>       }
>>>>     </script>
>>>>
>>>>
>>>> On Monday, May 20, 2013 5:45:21 AM UTC-4, John wrote:
>>>>>
>>>>> Hi! 
>>>>> I'm using a Chart in which I like that the tooltip is a info different 
>>>>> to the Chart.
>>>>> I'm using a ArrayToDataTable, but I don't know how I can do that. 
>>>>>
>>>>>
>>>>> That's is the code:
>>>>>
>>>>>             var dataTable = google.visualization.arrayToDataTable([
>>>>>   ['Year', 'Info1', 'Info2', 'Name' role:'tooltip'],
>>>>> ['1958',0,1,'Name1'],
>>>>> ['1961',0,1,'Name2']
>>>>> ]);
>>>>>
>>>>>
>>>>>  -- 
> 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/t4jAaaJc200/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] <javascript:>.
> To post to this group, send email to 
> [email protected]<javascript:>
> .
> Visit this group at 
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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