google.charts.load('current', {
packages: ['corechart']
}).then(function () {
var data = google.visualization.arrayToDataTable([
['Country', 'Anthracite', 'Lignite', 'Anthracite', 'Lignite', 'Anthracite', 'Lignite'],
['USA', 50000, 20000, 50000, 20000, 50000, 20000],
['Russia', 40000, 25000, 30000, 15000, 50000, 23000],
['China', 12000, 26000, 51000, 24000, 51000, 22000]
]);
var options = {
isStacked: true,
legend: {
position: 'bottom'
},
series: {
0: { // Anthracite 1
color: 'blue'
},
1: { // Lignite 1
color: 'red'
},
2: { // Anthracite 2
color: 'blue',
visibleInLegend: false
},
3: { // Lignite 2
color: 'red',
visibleInLegend: false
},
4: { // Anthracite 3
color: 'blue',
visibleInLegend: false
},
5: { // Lignite 3
color: 'red',
visibleInLegend: false
}
}
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart'));
chart.draw(data, options);
});
<script src="https://www.gstatic.com/charts/loader.js"></script>
<div id="chart"></div>