jeudi 2 novembre 2017

Error: Row 0 has 1 columns, but must have 2

I'm building google chart with following code but it give me error

google.charts.load("current", {packages:["corechart"]});
    google.charts.setOnLoadCallback(drawChart);
    function drawChart() {
      var data = google.visualization.arrayToDataTable([        
    @foreach($provider_ratings as $rc2)
    ["Category", "Drivers"],
    [,],
    @endforeach
      ]);

      var view = new google.visualization.DataView(data);
      view.setColumns([0,1]);

      var options = {
        title: "Drivers Categories",        
        bar: {groupWidth: "95%"},
        legend: { position: "none" },
      };
      var chart = new google.visualization.BarChart(document.getElementById("barchart_values"));
      chart.draw(view, options);
  }



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2gVZr9o
via IFTTT

Aucun commentaire:

Enregistrer un commentaire