Hi friends, I have a graph that works perfectly for me, but I have no idea 
how to remove the message "Data column (s) for axis # 0 cannot be of type 
string". This message shows it when there is no data, it is a dynamic graph 
and sometimes it will not have data, so I want to remove that message. I 
would appreciate your help. 

this is my graph.

<script type="text/javascript">

    google.charts.load("current", {packages:["corechart"]});
    google.charts.setOnLoadCallback(drawChart);
    function drawChart() {
      var data = google.visualization.arrayToDataTable([
       
        ['Nombre de evento', 'Cantidad de asistentes',{ role: "style" } ],
            @foreach ($datasis as $datasistencia)
              ["{{$datasistencia->Nombre}}", {{ $datasistencia->number}}, 
"#038579"],
        
            @endforeach
        ]);

      var view = new google.visualization.DataView(data);
      view.setColumns([0, 1,
                       { calc: "stringify",
                         sourceColumn: 1,
                         type: "string",
                         role: "annotation" },
                       2]);

      var options = {
        title: "Registro de usuarios que asistirián a los eventos",
        
        bar: {groupWidth: "75%"},
        legend: { position: "none" },
      };
      var chart = new 
google.visualization.BarChart(document.getElementById("barchart_valuesistencia"));
      chart.draw(view, options);
  }
  </script> 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/c1b72177-89aa-49bb-afd3-ee07847898ccn%40googlegroups.com.

Reply via email to