Is there a way to select the top two columns only? As a bonus, be able to 
sum the remaining columns into a column called 'Others'

For  example this table:

       E1  E2  E3  E4
C1     9    1   10   2
C2   10    2   15   1
C3     2    4   17   0

The sum of the columns will be 21, 7, 42 and 3 respectively.

The top two columns are E1 and E3, so the resulting table should look like:

       E1  E3  Others
C1     9  10         3
C2   10  15         2
C3     2  17         4

where others is the sum of the remaining columns (e.i: E2 and E4)


On Friday, July 13, 2012 7:26:42 AM UTC-7, Sudhir Kesharwani wrote:
>
> Thanks Buddy,
>
> It worked like a charm,  thanks a ton. I loved the way you gave me 
> solution. JSFiddle :)
>
> Regards,
> Sudhir
>
> On Thursday, 12 July 2012 19:17:41 UTC-5, asgallant wrote:
>>
>> You are trying to pivot the table, which isn't supported in DataTables. 
>>  You can manually pivot the table, though; see example: 
>> http://jsfiddle.net/asgallant/HkjDe/ 
>>
>> On Thursday, July 12, 2012 4:43:50 PM UTC-4, Sudhir Kesharwani wrote:
>>>
>>> Visualization Gurus...
>>>
>>> I have a data table object in following format.
>>>
>>>  Equipment Locationâ–˛ Count  e1 c16 e2 c1 
>>> 2 e3 c1 
>>> 1 e4 c1 
>>> 3 e1 c2 7 e2 c2 3 e1 c3 8 e2 c3 4
>>>
>>> I want to generate a data table from this data onto fixed number of rows 
>>> and column (missing values should be replaced with 0)
>>>     E1 E2 E3 E4  C1 XX xx xx xx  C2 xx xx 0 xx  C3 0 xx xx xx 
>>> Currently I don't see any method of querying details from a DataTable 
>>> object,  do we have any samples that uses getSelection()
>>>
>>> Can I use Query object with DataTable,  all the samples talk to Google 
>>> Spreadsheet.
>>>
>>> google.visualization.Query(*dataSourceUrl*, *opt_options*)
>>>
>>> Thanks in advance.
>>>
>>

-- 
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/d/optout.

Reply via email to