You'll have to do the math to make it happen. Set the value of the "total"
column to the difference between the two and the formatted value of the
"total" column to the total value (eg, if the total is X and internet sales
are Y, then the value of the total column is (X-Y) and the formatted value
of the total column is "X"). Ex (paste into viz playground to see it in
action):
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'foobar');
data.addColumn('number', 'Subtotal');
data.addColumn('number', 'Total');
data.addRows([
['foo', 3, {v: 7, f: "10"}],
['bar', 4, {v: 5, f: "9"}]
]);
// Create and draw the visualization.
var chart = new google.visualization.ColumnChart(document.getElementById(
'visualization'));
chart.draw(data, {
width:600,
height:400,
isStacked: true
});
}
--
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/-/ZCbNlw-Lr0cJ.
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.