1
I am trying to popular a line google-Harts chart, it will be quite simple just the client name on the x axis and the amount of open calls on the y axis, I am returning the following JSON array
[{"Name":"Customer Test","Tickets":6}]
to populate it I’m using the following:
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var jsonData = $.ajax({
url: "/client/ajax",
dataType: "json",
async: false
}).responseText;
var data = new google.visualization.DataTable(jsonData);
var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, {width: 400, height: 240});
}
But he returns telling me that there is no column =/, I’m using google Harts for the first time, I’m Noob :(.
Can someone give me a light? Thanks in advance.