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