AKAIK, that is not supported. You can hack around it by using stacked bars
and inserting null rows and cells. Copy-paste this into the viz playground
to see it in action:
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Fruit');
data.addColumn('number', 'Joe');
data.addColumn('number', 'John');
data.addColumn('number', 'Jane');
data.addColumn('number', 'Janet');
data.addRow(["Apples", 3, 5, null, null]);
data.addRow(["Apples", null, null, 3, 2]);
data.addRow([null, null, null, null, null]);
data.addRow(["Oranges", 4, 3, null, null]);
data.addRow(["Oranges", null, null, 0, 5]);
data.addRow([null, null, null, null, null]);
data.addRow(["Pears", 4, 4, null, null]);
data.addRow(["Pears", null, null, 4, 6]);
data.addRow([null, null, null, null, null]);
data.addRow(["Grapes", 2, 7, null, null]);
data.addRow(["Grapes", null, null, 4, 2]);
data.addRow([null, null, null, null, null]);
data.addRow(["Bananas", 5, 2, null, null]);
data.addRow(["Bananas", null, null, 3, 1]);
var chart = new google.visualization.ColumnChart(document.getElementById
('visualization'));
chart.draw(data, {
title:"Total fruit consumption, grouped by gender",
width:600, height:400,
hAxis: {
showTextEvery: 3
},
isStacked: true,
vAxis: {
title: "Number of Fruits"
}
});
}
Some tweaking will likely be required to make it work exactly how you want
it.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/UHcB29IxlRYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.