I have two charts feeding onto one page using google spreadsheets.  I want 
to add a column to my spreadsheets and have them feed to the charts as 
well.  How can I add the tooltips for each chart using my spreadsheets.

here is my working code so far:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8"></meta>
        <title>Home Page</title>
        <!--Load the AJAX API-->
        <script type="text/javascript" 
src="http://www.google.com/jsapi";></script>
        <script type="text/javascript">
            //Load the Visualization API and the ready-made Google table 
visualization
            google.load('visualization', '1', {'packages':['corechart']});
        </script>

        <script type='text/javascript'>

            function drawA() {
                // Define the chart using setters:
                var wrap = new google.visualization.ChartWrapper();
                wrap.setChartType('PieChart');
                
wrap.setDataSourceUrl('http://spreadsheets.google.com/tq?key=0AjlSK7_zXoNHdE5oOHE0cTlNd2pQbzF0T3RsbE9PZ3c&pub=1');
                wrap.setContainerId('energy-source-1');
                wrap.setOptions({'legend':['right', 
'end'],'colors':['#5dbbeb','#f39f28','#aedfe9', '#528dcc'], 
'is3D':'True','width':515,'height':400});
                wrap.draw();
                wrap.getChart();
            }

            function drawB() {
                // Define the chart using setters:
                var wrap = new google.visualization.ChartWrapper();
                wrap.setChartType('PieChart');
                
wrap.setDataSourceUrl('http://spreadsheets.google.com/tq?key=0AjlSK7_zXoNHdDl1TXBPVGdoWmpIVFF2Z0xkTzhHSWc&pub=1');
                wrap.setContainerId('energy-source-2');
                
wrap.setOptions({'legend':'none','colors':['#5dbbeb','#f39f28','#aedfe9', 
'#528dcc'], 'is3D':'True','width':315,'height':315});
                wrap.draw();
            }



            function drawVisualization() {
               drawA();
                drawB();

            }


            google.setOnLoadCallback(drawVisualization);
        </script>
    </head>
    <body>

<div style="width:95%; height:auto; float:left; margin:0; padding:0;">

        <div id="energy-source-1" style="float:left;"></div>
<div id="energy-source-2" style="float:left;margin-top:50px; 
margin-left:-150px;" ></div>
</div>
    </body>
</html>

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