Click here to Skip to main content
15,906,628 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
This example passes in a JSON string representation of the chart, which you might have loaded from a file:

XML
<script type="text/javascript>
  google.load('visualization',' 1.0');
  var myStoredString = '{"containerId": "visualization_div",'; +
        '"dataSourceUrl:": "https://spreadsheets.google.com/a/google.com/tq?key=pCQbetd-CptGXxxQIG7VFIQ&pub=1",' +
        '"query":"SELECT A,D WHERE D > 100 ORDER BY D" ,' +
        '"refreshInterval": 5,' +
        '"chartType": "Pie",' +
        '"options":{'+
        '  "alternatingRowStyle": true,' +
        '   "showRowNumber" : true' +
        '}' +
      '}';
  function drawVisualization() {
    google.visualization.drawChart(myStoredString);
  }
  google.setOnLoadCallback(drawVisualization);
</script>



I have a query with multiple aggregate function which must get replaced in "query",but I'm unable to refer the query. Please guide me.
Or if there is any other alternative,please suggest.
My requirement is to display a 2D pie chart where I can connect to my datasource and stored procedure/query.
Posted
Updated 6-Apr-14 20:45pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900