Google Charts - Customized Tooltip Timeline Chart

You are Here:

How to Draw a Customized Tooltip Timeline Chart?

Please wait google chart is loading...

In this example, we will draw a customized tooltip timeline 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':['timeline']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var container = document.getElementById('point'); var chart = new google.visualization.Timeline(container); var dataTable = new google.visualization.DataTable(); dataTable.addColumn({ type: 'string', id: 'President' }); dataTable.addColumn({ type: 'string', id: 'dummy bar label' }); dataTable.addColumn({ type: 'string', role: 'tooltip' }); dataTable.addColumn({ type: 'date', id: 'Start' }); dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addRows([ [ 'Washington', null, 'Tooltip1', new Date(1789, 3, 29), new Date(1797, 2, 3) ], [ 'Adams', null, 'Tooltip2', new Date(1797, 2, 3), new Date(1801, 2, 3) ], [ 'Jefferson', null, 'Tooltip3', new Date(1801, 2, 3), new Date(1809, 2, 3) ] ]); chart.draw(dataTable); } </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