Answers for "google chart ajax json"

0

google chart ajax json

$.ajax({
  url: 'https://www.google.com/jsapi?callback',
  cache: true,
  dataType: 'script',
  success: function(){
    google.load('visualization', '1', {packages:['corechart'], 'callback' : function()
      {

            $.ajax({
                 type: "POST",
                 dataType: "json",
                 data: {id: YOURIDHERE},
                 url: '<?=URL?>' + 'ajaxlibrary/get-charts',
                 success: function(jsondata) {
                    var data = google.visualization.arrayToDataTable(jsondata);

                    var options = {title: 'My Daily Activities'};

                    var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
                    chart.draw(data, options);
                 }
            });    
        ]);

      }
    });
    return true;
  }
});
Posted by: Guest on March-01-2021
0

google chart ajax json

$.getJSON('/getjson.php', function(json) {
    var dataTable = new google.visualization.DataTable(json);
});
Posted by: Guest on March-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language