Thank you so much Asgallant, that really helped me to see what I did wrong 
and it is nice.

Take care and again thank you for your help.



On Tuesday, January 8, 2013 2:37:54 PM UTC-9, asgallant wrote:
>
> To get the tooltips, you have to include the tooltip column after every 
> data column in the view.  Also, if you are looking for different colors for 
> each bar, you might be better off assigning data to columns by name rather 
> than by value (example here: http://jsfiddle.net/asgallant/zwPuU/). 
>  Here's an example using your code as the base: 
> http://jsfiddle.net/asgallant/JENzE/
>
> On Tuesday, January 8, 2013 5:23:25 PM UTC-5, Justawebbie wrote:
>>
>> I know this is just me getting myself confused as I read all the 
>> different ways everyone is doing this. I am trying to color each column a 
>> different color and use tooltips all coming from a google spreadsheet. I 
>> have tried doing isStacked with 0's in the other columns which worked but 
>> my tooltips stopped working for the 2 of the 3 columns.  I then went back 
>> to the drawing board so now I am stuck.  I think I just have this a bit off 
>> in coding or I am way off base on it.  Thanks in advance for any help you 
>> give to this newby.
>>
>>     var visualization;
>>
>>     function drawVisualization() {
>>         var query = new google.visualization.Query(
>>             '
>> http://spreadsheets.google.com/tq?key=0AjlSK7_zXoNHdHJ3ZXY2VHAyUWhXcVVkdGUwdXNCeHc&pub=1'
>> );
>>     
>>         // Apply query language statement.
>>         
>>         
>>         // Send the query with a callback function.
>>         query.send(handleQueryResponse);
>>       }
>>     
>>       function handleQueryResponse(response) {
>>         if (response.isError()) {
>>           alert('Error in query: ' + response.getMessage() + ' ' + 
>> response.getDetailedMessage());
>>           return;
>>         }
>>  var view = new google.visualization.DataView(data);
>>     view.setColumns([0, {
>>         type: 'number',
>>         label: 'Value',
>>         calc: function (dt, row) {
>>             return (dt.getValue(row, 1) > 10) ? dt.getValue(row, 1) : 
>> null;
>>         }
>>     }, {
>>         type: 'number',
>>         label: 'Value',
>>         calc: function (dt, row) {
>>             return (dt.getValue(row, 1) < 10 && dt.getValue(row, 1) > 30) 
>> ? dt.getValue(row, 1) : null;
>>         }
>>     }, {
>>         type: 'number',
>>         label: 'Value',
>>         calc: function (dt, row) {
>>             return (dt.getValue(row, 1) < 30 && dt.getValue(row, 1) < 50) 
>> ? dt.getValue(row, 1) : null;
>>         }
>>     }]);
>>         var data = response.getDataTable();
>>          // set the 3rd column to the "tooltip" role
>>         data.setColumnProperty(2, 'role', 'tooltip');
>>         visualization = new 
>> google.visualization.ColumnChart(document.getElementById('visualization'));
>>         visualization.draw(data, view, {backgroundColor: 
>> '#ffffff',legend: 'none', colors:['#336699'],is3D:'True', 
>> isStacked:'true'});
>>         
>>         
>>       }
>>       
>>      
>>     google.setOnLoadCallback(drawVisualization);
>>
>>
>>

-- 
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/-/D2CKkv47bu4J.
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