Google Charts - Dual Y-Axes Column Chart

You are Here:

How to Draw a Dual Y-Axes Column Chart?

Please wait google chart is loading...

In this example, we will draw a dual y-axes 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(drawDualX); function drawDualX() { var data = google.visualization.arrayToDataTable([ ['Companies', 'Facebook', 'Youtube'], ['Honda', 6505000, 8008000], ['Hyundai', 6005000, 4008000], ['Kia', 2095000, 2196000], ['Jaguar', 5098100, 1003000], ['Toyota', 6105000, 5508000] ]); var options = { height: 400, width: 600, chart: { title: 'Car Companies - Advertising Statistics', subtitle: 'Based on Arpil 19 - Feb 20' }, hAxis: { title: 'Total Population' }, vAxis: { title: 'City' }, bars: 'vertical', series: { 0: {axis: 'facebook'}, 1: {axis: 'youtube'} }, axes: { y: { facebook: {label: 'Advertisement in Facebook (in millions)', side: 'top'}, youtube: {label: 'Advertisement in Youtube (in millions)'} } } }; var materialChart = new google.charts.Bar(document.getElementById('point')); materialChart.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