In google charts, you can create a diffChart which will give you a nice representation of data by showing 1 series of data in front of the other, like so
Problem is i need to do this with more then 2 series, i would like to do it with up to 4, stacking each item in front of each other. Is this possible using google charts?? I do not care if i have to use different google charts to accomplish this, but i need the 4 series in front of each other, NOT side by side
Here is an example plunkr, but it only compares the 2 first data sets
http://jsfiddle.net/Gillardo/nv8kb58y/5/
function drawChart() {
var oldData = google.visualization.arrayToDataTable([
['Name', 'Popularity'],
['Cesar', 250],
['Rachel', 4200],
['Patrick', 2900],
['Eric', 8200]
]);
var newData = google.visualization.arrayToDataTable([
['Name', 'Popularity'],
['Cesar', 370],
['Rachel', 600],
['Patrick', 700],
['Eric', 1500]
]);
var thirdData = google.visualization.arrayToDataTable([
['Name', 'Popularity'],
['Cesar', 100],
['Rachel', 100],
['Patrick', 100],
['Eric', 100]
]);
var colChartDiff = new google.visualization.ColumnChart(document.getElementById('chart_div'));
var options = { legend: { position: 'top' } };
var diffData = colChartDiff.computeDiff(oldData, newData);
var diffData2 = colChartDiff.computeDiff(diffData, thirdData);
colChartDiff.draw(diffData, options);
console.log(diffData2);
}
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
See Question&Answers more detail:os