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);

-- 
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/-/FH08yshiKdkJ.
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.

Reply via email to