Thanks, that's exactly what i was looking for, ill try it out tomorrow.

On Tuesday, August 13, 2013 10:10:06 PM UTC+1, asgallant wrote:
>
> There's no built-in way to use column ID's to get data from the DataTable 
> (you have to parse the table to find the index of a column with the given 
> ID; not difficult, but it is an extra step).  If your cumulative function 
> can take a parameter for the column number, then you can use a method like 
> this to create your calculated columns:
>
> dataview.setColumns([1, 2, {
>     calc: function (dt, row) {
>         return sum(dt, row, 1);
>     },
>     type: 'number',
>     label: 'Foo :: Total Distance'
> }, {
>     calc: function (dt, row) {
>         return sum(dt, row, 2);
>     },
>     type: 'number',
>     label: 'Bar :: Total Distance'
> }]);
>
> On Tuesday, August 13, 2013 3:56:00 PM UTC-4, James Patrick-Evans wrote:
>>
>> Copying the playground code messed up, here's the full version: 
>> http://pastebin.com/q8Rxhut0
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to