I'm encountering the following error:
VM3611: 231 Uncaught Error: Unknown header type: 6
Code:
google.charts.load('current', {'packages': ['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var jsonData = $.ajax({
url: "/client/ajax",
dataType: "JSON",
async: false
}).responseJSON;
var data = google.visualization.arrayToDataTable([
['Name' , 'Tickets']
]);
for(var i=0;i<jsonData.length;i++){
var array = [jsonData[i].Name , jsonData[i].Tickets]
data = (google.visualization.arrayToDataTable([
array
]));
}
var chart = new google.visualization.L
ineChart(document.getElementById('chart_div'));
chart.draw(data);
I've never used the charts, I wonder if I'm doing it right? And the reason for the mistake? Thank you community!