This is not explicitly supported, but you can hack around it using a DataView with calculated columns:
var view = new google.visualization.DataView(data);
view.setColumns([0, {
label: 'bananas',
type: 'number',
calc: function (dt, row) {
// if type = bananas, return this value, otherwise return null
if (dt.getValue(row, 2) == 'bananas') {
return dt.getValue(row, 1);
}
else {
return null;
}
}
}, {
label: 'tomatos',
type: 'number',
calc: function (dt, row) {
// if type = tomatos, return this value, otherwise return null
if (dt.getValue(row, 2) == 'tomatos') {
return dt.getValue(row, 1);
}
else {
return null;
}
}
}]);
Draw the chart using this view.