title: Using float value in Google Line chart using PHP
body: <p>Line chart is drawn very fine using (int) values using Google Charts API (see exact below code) but one of the percentage column value is in float so I tried (floatval) instead of (int) but PHP server file throws 500 internal server error.</p>
  
  <p>What is the solution in especially at to use float value?</p>
  
  <pre><code>(int)str_replace("%", "", $row['percentage'])
  </code></pre>
  
  <p>Also note that, my values are coming as JSON from MySQL.</p>
  
  <p>PHP (server file):</p>
  
  <pre><code>   $rows[] = array(explode(" - ", $row['started_on'])[0].trim(), 'Coverage');
          while($row =  mysqli_fetch_array($result)) {
              $rows[] = array(explode(" - ", $row['started_on'])[0].trim(), (int)str_replace("%", "", $row['percentage']));
          }
  </code></pre>
  
  <p>JS (in php):</p>
  
  <pre><code>// Draw line chart
  function drawLineChart(chartType, chartTitle) {
      google.charts.setOnLoadCallback(lineChartData);
  
      function lineChartData() {
          var lineChartJsonData = $.ajax({
              type: 'GET',
              url: "&lt;?php echo $general_scripts; ?&gt;",
              data: { id1: chartType, id2: "Chart", id100: "&lt;?php echo $getPage; ?&gt;" },
              dataType:"json",
              async: false,
              beforeSend: function() {
                  $("#progress").show();
              },
              success: function(data) {
                  $("#progress").hide();
              },
          }).responseText;
  
          var options = {
              title: chartTitle,
              width: '390',
              height: '300',
              backgroundColor: '#f5fffa',
          };
  
          var data = new google.visualization.arrayToDataTable(($.parseJSON(lineChartJsonData)));
          var chart = new google.visualization.LineChart(document.getElementById(chartType));
          chart.draw(data, options);
      }
  }
  </code></pre>