Google Charts - No Dependencies Gantt Chart

You are Here:

How to Draw a No Dependencies Gantt Chart?

Please wait google chart is loading...

In this example, we will draw a no dependencies gantt chart. Please hover the bars in the above chart to view particular details.


HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src=""></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>


Hi Developers, we almost covered 98% of Google Charts Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in Google Charts.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author