You will have to set the formatted value of the "Sales" column (in this example). You can set it manually when you build your DataTable:
data.setValue(0, 1, {v: 1000, f: "1000\nExpenses: 400"});
Or you can use a view to auto-calculate this for you:
/* creates a view with a calculated column that puts the
* value of column 2 into the tooltip of column 1
* assumes:
* data is a populated DataTable object
* column 1 is labeled 'Sales'
* column 2 is labeled 'Expenses'
* chart is the Chart Object to draw
* options is an object of chart options to draw with
*/
var view = new google.visualization.DataView(data);
view.setColumns(0, {
type: 'number',
label: 'Sales',
calc: function(dataTable, rowNum) {
return {
v: dataTable.getValue(rowNum, 1),
f: dataTable.getValue(rowNum, 1) + '\nExpenses' + dataTable.getValue(rowNum, 2)
};
}
});
chart.draw(view, options);