hi

19 views
Skip to first unread message

sk

unread,
May 23, 2012, 4:44:13 AM5/23/12
to Google Visualization API
i'm trying to display table,map,pie chart with different database
URLS ,
is there any possibility to do so...

sk

unread,
May 23, 2012, 5:10:48 AM5/23/12
to Google Visualization API
i want to draw the column chart and pie chart by using the following
data
https://docs.google.com/spreadsheet/ccc?key=0ArFGfpB6duBGdFBJNVI1c3liaXd0c3l3UVNFMmZoMEE&pli=1#gid=2
can any body help me

asgallant

unread,
May 23, 2012, 11:16:40 AM5/23/12
to google-visua...@googlegroups.com
Yes, you can do this.  Your code might look something like:

google.load('visualization''1'{packages['corechart']});
google.setOnLoadCallback(drawCharts);

function drawCharts({
    var query new google.visualization.Query('https://docs.google.com/spreadsheet/ccc?key=0ArFGfpB6duBGdFBJNVI1c3liaXd0c3l3UVNFMmZoMEE&pli=1#gid=2');
    query.setQuery('put your select statement here');
    query.send(function (response{
        var data response.getDataTable();
        
        var column new google.visualization.ChartWrapper({
            chartType'Column',
            dataTabledata,
            containerId'column_chart_div',
            options{
                // chart options here
            },
            view{
                // define data view here, usually by setting the columns to use, ie:
                columns[012// use the first three columns
            }
        });
        column.draw();
        
        var pie new google.visualization.ChartWrapper({
            chartType'Pie',
            dataTabledata,
            containerId'pie_chart_div',
            options{
                // chart options here
            },
            view{
                // define data view here, usually by setting the columns to use, ie:
                columns[03// use the first and fourth columns
            }
        });
        pie.draw();
    });

sk

unread,
May 24, 2012, 3:53:47 AM5/24/12
to google-visua...@googlegroups.com
thanku soo much

asgallant

unread,
May 24, 2012, 9:11:05 AM5/24/12
to google-visua...@googlegroups.com
You're welcome.
Reply all
Reply to author
Forward
0 new messages