I\'m trying to create a simple chart in a page using mysql data retrieved using a mysql script
I don\'t understand how to integrate the ajax call with the data requi
In your ajax success function call your visitorData function with data[1].data (since that's how your json is formatted)
$.ajax({
url: '/visitdata',
type: 'GET',
async: true,
dataType: "json",
success: function (data) {
visitorData(data[1].data);
}
});
also, your visitorData function def is odd.
vistorData = function(data)
or
function vistorData(data)