title: Google Charts won't work if passing JSON data but works with fixed data
body: <p>Here is my code:</p>
  
  <pre><code>&lt;?php
  $chart_arr = ['2016', 5000];
  json_encode($chart_arr)
  ?&gt;
  
  &lt;script type="text/javascript"&gt;
      google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawChart);
      function drawChart() {
  
        var data = new google.visualization.DataTable();
          data.addColumn('string', 'Task');
          data.addColumn('number', 'Hours per Day');
          data.addRows(&lt;?=json_encode($chart_arr)?&gt;);
  
        var options = {
        };
  
        var chart = new google.visualization.PieChart(document.getElementById('piechart'));
  
        chart.draw(data, options);
      }
  &lt;/script&gt;
  
  &lt;div class="row"&gt;
  
      &lt;div id="piechart" style="width: 900px; height: 500px;" class="col-md-4"&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>With that code, the chart won't display. Otherwise, if I just echo the json_encode in PHP, it echo exactly as the GCharts wants to. Example: ["2016",5000]. As I tried here:</p>
  
  <pre><code>&lt;div class="col-md-4"&gt;
          &lt;?=json_encode($chart_arr)?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It seems very confuse to me. Never thought that work with charts would be so confusing.</p>