Google Charts - Negative Stacked Column Chart

You are Here:

How to Draw a Negative Stacked Column Chart?

Please wait google chart is loading...

In this example, we will draw a negative stacked 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(drawStacked); function drawStacked() { var data = google.visualization.arrayToDataTable([ ['Month', 'Greenland', 'USA'], ['Jan', -17, 11], ['Feb', -20, 12], ['Mar', -20.1, 15], ['Apr', -13.1, 17], ['May', 1.7, 23] ]); var options = { title: 'Greenland vs USA weather report', height: 400, width: 600, chartArea: { width: '50%' }, isStacked: true, hAxis: { title: 'Month', minValue: 0, }, vAxis: { title: 'Weather in celsius' } }; 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