title: I can't dislay a Column Chart (Google Chart - Server Side)
body: <p>I try to use Google Charts in one of my projects. My SQL is working good, but I can't get the chart, maybe i need to mention that my data is a number (0.00). I am using my POSTGRESQL DB (server side) </p>
  
  <p>Here's my code:   </p>
  
  <pre><code>  &lt;script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
    google.charts.load('current', {'packages':['corechart','bar']});
    google.charts.setOnLoadCallback(drawChart);
  
    function drawChart() {
      var data = google.visualization.arrayToDataTable([
        ['niveau','me1','me2','me3','me4','me5','me6'],
  
      &lt;?php
          $result = $pdo-&gt;query ("SELECT  
                  niveau.nom_niveau AS niveau,
                  ROUND (( SUM(CASE WHEN mesure.e1 IS NOT NULL THEN mesure.pp*mesure.e1 ELSE null END) / SUM(CASE WHEN mesure.e1 IS NOT NULL THEN mesure.pp ELSE null END)) ,2) AS me1,
                  ROUND (( SUM(CASE WHEN mesure.e2 IS NOT NULL THEN mesure.pp*mesure.e2 ELSE null END) / SUM(CASE WHEN mesure.e2 IS NOT NULL THEN mesure.pp ELSE null END)) ,2) AS me2,
                  ROUND (( SUM(CASE WHEN mesure.e3 IS NOT NULL THEN mesure.pp*mesure.e3 ELSE null END) / SUM(CASE WHEN mesure.e3 IS NOT NULL THEN mesure.pp ELSE null END)) ,2) AS me3,
                  ROUND (( SUM(CASE WHEN mesure.e4 IS NOT NULL THEN mesure.pp*mesure.e4 ELSE null END) / SUM(CASE WHEN mesure.e4 IS NOT NULL THEN mesure.pp ELSE null END)) ,2) AS me4,
                  ROUND (( SUM(CASE WHEN mesure.e5 IS NOT NULL THEN mesure.pp*mesure.e5 ELSE null END) / SUM(CASE WHEN mesure.e5 IS NOT NULL THEN mesure.pp ELSE null END)) ,2) AS me5,
                  ROUND (( SUM(CASE WHEN mesure.e6 IS NOT NULL THEN mesure.pp*mesure.e6 ELSE null END) / SUM(CASE WHEN mesure.e6 IS NOT NULL THEN mesure.pp ELSE null END)) ,2) AS me6
          FROM mesure , puits, niveau , gisement
          where mesure.cm = puits.cm
          and mesure.num_niveau = niveau.id_niveau
          and gisement.id_gisement = puits.num_gisement
          group by niveau.nom_niveau");
  
          foreach($result AS $row) {
              echo "['".$row['niveau']."',".$row['me1'].",".$row['me2'].",".$row['me3'].",".$row['me4'].",".$row['me5'].",".$row['me6']."], "; 
          }
      ?&gt;
      ]);
  
      var options = {
          chart: {
          title: '',
          subtitle: 'Moyenne Pondérée des éléments chimiques en chaque niveau phoshaté' }
      };
  
      var chart = new google.charts.Bar(document.getElementById('columnchart_material'));
      chart.draw(data, google.charts.Bar.convertOptions(options));       
    }
    &lt;/script&gt;
  </code></pre>
  
  <p>Here's my data table:</p>
  
  <p><a href="https://i.stack.imgur.com/efDj4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/efDj4.png" alt="Here&#39;s my data "></a></p>
  
  <p>I hope someone can help me out on this.</p>