arrayToDataTable() source from Database

39 views
Skip to first unread message

njhelloworld

unread,
Oct 28, 2017, 4:38:29 AM10/28/17
to Google Visualization API
I wanted to use my jsonData as source to my arraytoDataTable().But it is not working.I would like to ask how can I use this method right:
        
  var jsonData = $.ajax({
                url: "sampleseptember.php",
                dataType: "json",
                async: false
            }).responseText;

          var obj = jQuery.parseJSON();
          var dataseptember = google.visualization.arrayToDataTable(jsonData);
          dataseptember.addColumn('date', 'time_stamp');
          dataseptember.addColumn('number', 'ph');
          dataseptember.addColumn('number', 'moist');    
          $.each(results, function (i, row) {        
          data.addRow([
         new Date(row.time_stamp),
          parseFloat(row.ph),
          parseFloat(row.moist)
            ]);
          });

Ryan Reynolds

unread,
Oct 30, 2017, 1:00:31 PM10/30/17
to Google Visualization API
It may help if you posted a snippet of the actual JSON data you are trying to parse.
Reply all
Reply to author
Forward
0 new messages