Google Charts: How to pass a JSON data to ChartWrapper() function?

23 views
Skip to first unread message

abhishek sinha

unread,
Sep 18, 2015, 1:53:07 AM9/18/15
to Google Visualization API
In the example given in the documentation (link:https://developers.google.com/chart/interactive/docs/reference#example_7), how to send data in the form of JSON instead of URL?? 
CODE:
var wrapper = new google.visualization.ChartWrapper({
         
'chartType':'LineChart',
         
'dataSourceUrl':'http://spreadsheets.google.com/tq?key=pCQbetd-CptGXxxQIG7VFIQ&pub=1',
         
'query':'SELECT A,D WHERE D > 100 ORDER BY D',
         
'options': {'title':'Population Density (people/km^2)', 'legend':'none'}
     
});
In the above code, instead of passing data through URL by dataSourceUrl, I want to send data by JSON. What parameter should I use instead of dataSourceUrl? 
Reply all
Reply to author
Forward
0 new messages