<!DOCTYPE html>
<html lang="en-US">
<head>
<script src="https://www.gstatic.com/charts/loader.js"></script>
</head>
<body>
<div id="point">
</div>
<script>
google.charts.load('current', {'packages':['gantt']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Task ID');
data.addColumn('string', 'Task Name');
data.addColumn('string', 'Resource');
data.addColumn('date', 'Start Date');
data.addColumn('date', 'End Date');
data.addColumn('number', 'Duration');
data.addColumn('number', 'Percent Complete');
data.addColumn('string', 'Dependencies');
data.addRows([
['Math', 'Math 1', 'book',
new Date(2014, 2, 22), new Date(2014, 5, 20), null, 75, null],
['Physics', 'Physics 1', 'note',
new Date(2014, 5, 21), new Date(2014, 8, 20), null, 85, null],
['Chemistry', 'Chemistry 1', 'xerox',
new Date(2014, 8, 21), new Date(2014, 11, 20), null, 35, null],
['Botany', 'Botany 1', 'pdf',
new Date(2014, 11, 21), new Date(2015, 2, 21), null, 56, null],
['Zoology', 'Zoology 1', 'book',
new Date(2015, 2, 22), new Date(2015, 5, 20), null, 90, null]
]);
var options = {
height: 350,
gantt: {
trackHeight: 50
}
};
var chart = new google.visualization.Gantt(document.getElementById('point'));
chart.draw(data, options);
}
</script> </body>
</html>