Google Charts - Annotation Column Chart

You are Here:

How to Draw a Annotation Column Chart?

Please wait google chart is loading...

In this example, we will draw a annotation column chart. Please hover the columns in the above chart to view particular details.

Example

HTML Online Editor
<!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: ['corechart', 'bar']}); google.charts.setOnLoadCallback(drawAnnotations); function drawAnnotations() { var data = google.visualization.arrayToDataTable([ ['Company', 'Facebook', {type: 'string', role: 'annotation'}, 'Youtube', {type: 'string', role: 'annotation'}], ['Honda', 6505000, '6.5M', 5008000, '5M'], ['Hyundai', 6005000, '6M', 4008000, '4M'], ['Kia', 2095000, '2M', 2196000, '2.2M'], ['Jaguar', 5098100, '5.1M', 1003000, '1M'], ['Toyota', 6105000, '6.1M', 5508000, '5.5M'] ]); var options = { title: 'Car Companies - Advertising Statistics', height: 350, width: 600, chartArea: { width: '60%' }, annotations: { alwaysOutside: true, textStyle: { fontSize: 12, auraColor: 'none', color: '#555' }, boxStyle: { stroke: '#ccc', strokeWidth: 1, gradient: { color1: '#f3e5f5', color2: '#f3e5f5', x1: '0%', y1: '0%', x2: '100%', y2: '100%' } } }, hAxis: { title: 'Companies', minValue: 0, }, vAxis: { title: 'Total Amount' } }; var chart = new google.visualization.ColumnChart(document.getElementById('point')); chart.draw(data, options); } </script> </body> </html>

Reminder

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