title: How to display ganttchart with mysql database values in laravel?
body: <p>I want to make a ganttchart, where I can retrieve data from database using mysql. </p>
  
  <p>Highcharts do no include ganttchart, so i tried google charts. I am able to  retrieve values from database and its can be seen in the page source, but not getting the output.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
  
      google.load("visualization", "1.1", {packages:["gantt"]});
      google.setOnLoadCallback(drawChart);
  
  
          &lt;?php 
           $con = mysqli_connect("localhost","root","","db1") or die("could not connect");
           $query= "select * from view_chart";
           $qresult=mysqli_query($con,$query);
  
           $results = array();
           while($res = mysqli_fetch_array($qresult))
             {
               $results[] = $res;
             }
  
           $gan_data = array();
           foreach($results as $result)
             {
                $gan_data[] = ($result['Brands']);
                $gan_data1[] = ((int)$result['ratings']);
                $gan_data2[] = ((int)$result['bigbazar']);
             }
           $gan_data = json_encode($gan_data);
           $gan_data1 = json_encode($gan_data1);
           $gan_data2 = json_encode($gan_data2);
           mysqli_free_result($qresult);
        ?&gt;
  
  
      function drawChart() {
       // var container = document.getElementById('gantt');
        //var chart =new google.visualization.GanttChart(container);
         alert('hello');
        var data = new google.visualization.arrayToDataTable(&lt;?=$gan_data?&gt;);
  
          data.addColumn( type: 'string', id: 'Brands' );
          data.addColumn( type: 'number', id: 'ratings' );
          data.addColumn( type: 'number', id: 'bigbazar' );
  
          data.addRows([
          &lt;?php echo $gan_data; ?&gt;,
          &lt;?php echo $gan_data1; ?&gt;, 
          &lt;?php echo $gan_data2; ?&gt;]);
  
          var options = {
          height: 275
        };
  
  
          var chart = new google.visualization.GanttChart(document.getElementById('chart_div'));
          chart.draw(data,options);
      }
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="chart_div"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>