javascript - AJAX response in arrayToDataTable -


i trying make google chart ajax call, response string written array created in php

['a', "test 1","test 2","test 3","test 4"],['01-06-2015', 2 , 0 , 0 , 0 ],['03-06-2015', 0 , 5 , 4 , 0 ],['05-06-2015', 2 , 0 , 0 , 0 ],['06-06-2015', 8 , 0 , 0 , 0 ],['02-06-2015', 0 , 5 , 0 , 3 ],['04-06-2015', 0 , 7 , 0 , 0 ] 

then trying make chart ajax

success: function(response) {      console.log(response);     var data = google.visualization.arraytodatatable([response]);      var view = new google.visualization.dataview(data);      var options = {         title: "projects employees",         vaxis: {title: "projects", ticks: [1,2,3,4,5,6,7,8,9]},         haxis: {title: "days"},         seriestype: "bars"      };     var chart = new google.visualization.combochart(document.getelementbyid("chart_div"));     chart.draw(view, options); } 

i error in console saying 'uncaught error: first row not array.' because putting word response in function.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -