1
I’m facing the following mistake:
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 Charts, I wonder if I’m doing it right? And the reason for the mistake? Thank you to the community!
What kind of Chart you want to do?
– Ivan Ferrer