I did the manual way and it works fine for me.
I check the value from ALL rows in column 4 and sum it to a variable.

function totalWeight() {
 

var weightTotal=0;

 

for (var i=0; i<(tableData.getNumberOfRows()-1); i++)

{

weightTotal += tableData.getValue(i, 4);

}

 

tableData.setValue(tableData.getNumberOfRows()-1, 4, weightTotal);

}

On Tuesday, 27 September 2011 20:07:29 UTC+1, NA wrote:
>
>
> I initially agreed with that, but then realized that you'd need to 
> teach a Table how to aggregate the columns, which it doesn't know how 
> to do.  The DataTable, on the other hand, knows how to perform 
> aggregations, so adding an totals row property to the DataTable and 
> having the Table know how to present that row might be smoother. 
>
> Either way, while my preference is for the above, I don't see anything 
> horrible with teaching the Table how to aggregate and then adding the 
> feature there. 
>
> thanks, 
>
>

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