Date position for Google Gantt chart

0

Google Timeline Chart

I'm using the Gantt Chart, from the Google documentation, follow the image from my chart below:

Iwantthechart'sdatestobeatthetopofthechart,notthefooter.

Ididnotfindanythinginthedocumentation,andalltheothergraphicsIlookedatfromgoogle,presentationinthefooterasadefault.

GoogleDocs:

link

link

link

link

link

My code:

<script type="text/javascript" src="https://www.google.com/jsapi"></script><scripttype="text/javascript">
  google.load("visualization", "1", {packages:["timeline"]});
  google.setOnLoadCallback(drawChart);
  function drawChart() {
    var container   = document.getElementById('timeline');
    var chart       = new google.visualization.Timeline(container);
    var dataTable   = new google.visualization.DataTable();
    dataTable.addColumn({ type: 'string',   id: 'Position' });
    dataTable.addColumn({ type: 'string',   id: 'President' });
    dataTable.addColumn({ type: 'date'  ,   id: 'Start' });
    dataTable.addColumn({ type: 'date'  ,   id: 'End' });
    dataTable.addRows([
        <?php
        while (!$rs->EOF){
            $html .= "
                      [
                          '{$dados['nome']}',                
                          '{$dados['etapa_nome']}',
                          new Date({$dados['data_inicial'][0]},
                          {$dados['data_inicial'][1]},
                          {$dados['data_inicial'][2]}),
                          new Date({$dados['data_final'][0]},
                          {$dados['data_final'][1]},
                          {$dados['data_final'][2]})
                      ]
                ,
            ";
            $rs->MoveNext();
        }
        $html = substr($html, 0, -1);
        echo $html;
        ?>
   ]); 
var options = {
    avoidOverlappingGridLines: false
  };
    chart.draw(dataTable, options);
}
    </script>

Does anyone know which parameter, and how do I change the position?

    
asked by anonymous 29.12.2015 / 20:43

1 answer

0

Now define this in your options:

var options = {
   axes: {
      x: {
        0: {side: 'top'}
      }
    },
    avoidOverlappingGridLines: false
};

That will solve:)

    
29.12.2015 / 23:27