JavaScript
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Year', 'Sales', 'Expenses', 'Profit1', 'Sales1', 'Expenses1', 'Profit2', 'Sales2', 'Expenses2', 'Profit3'],
['2014', 1000, 400, 200, 1000, 400, 200, 1000, 400, 200],
['2015', 1170, 460, 250, 1170, 460, 250, 1170, 460, 250],
['2016', 1170, 460, 250, 1170, 460, 250, 1170, 460, 250],
['2017', 1170, 460, 250, 1170, 460, 250, 1170, 460, 250],
['2018', 1000, 400, 200, 1000, 400, 200, 1170, 460, 250],
['2019', 1170, 460, 250, 1170, 460, 250,1000, 400, 200],
['2020', 1170, 460, 250, 1170, 460, 250,1000, 400, 200],
['2020', 1170, 460, 250, 1170, 460, 250,1000, 400, 200]
]);
var options = {
height: 450,
chart: {
title: 'Company Performance',
subtitle: 'Sales, Expenses, and Profit: 2014-2017',
},
bars: 'vertical' // Required for Material Bar Charts.
};
var chart = new google.charts.Bar(document.getElementById('barchart_material'));
chart.draw(data, options);
}
google.load("visualization", "1.1", {packages:["bar"]});
google.setOnLoadCallback(drawChart);