google chart ajax json

Solutions on MaxInterview for google chart ajax json by the best coders in the world

showing results for - "google chart ajax json"
Ange
23 Jan 2019
1$.ajax({
2  url: 'https://www.google.com/jsapi?callback',
3  cache: true,
4  dataType: 'script',
5  success: function(){
6    google.load('visualization', '1', {packages:['corechart'], 'callback' : function()
7      {
8
9            $.ajax({
10                 type: "POST",
11                 dataType: "json",
12                 data: {id: YOURIDHERE},
13                 url: '<?=URL?>' + 'ajaxlibrary/get-charts',
14                 success: function(jsondata) {
15                    var data = google.visualization.arrayToDataTable(jsondata);
16
17                    var options = {title: 'My Daily Activities'};
18
19                    var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
20                    chart.draw(data, options);
21                 }
22            });    
23        ]);
24
25      }
26    });
27    return true;
28  }
29});
30
Carmel
24 Jul 2017
1$.getJSON('/getjson.php', function(json) {
2    var dataTable = new google.visualization.DataTable(json);
3});
4