Could you share the piece of code please?
Because the function group() return a table, but how can I draw it? I mean 
to draw I have to pass the data but they now are different from origin 
because of the group by applied.
Thanks.

Rita

Il giorno mercoledì 24 luglio 2013 17:41:49 UTC+2, Sergey ha scritto:
>
> I simply tried to group the default table for the LineChart in the 
> playground: 
> https://code.google.com/apis/ajax/playground/?type=visualization#line_chart
>
> Perhaps you could distill your datatable to the simplest case that fails 
> for you? I think this might be something specific about your data.
>
> - Sergey
>
>
> On Wed, Jul 24, 2013 at 11:25 AM, Rita <[email protected] <javascript:>>wrote:
>
>> Sergey, thanks for the reply.
>>
>> I'm using the version 1.0. The table has 4 columns. The first of type 
>> string, is the one on which I want to group by. The others are of type 
>> number and I'd like to apply the function sum.
>>
>> Did you use a different code?
>>
>> Rita
>>
>> Il giorno mercoledì 24 luglio 2013 15:58:29 UTC+2, Sergey ha scritto:
>>>
>>> Hi Rita, I'm afraid we're going to need a little more detail. What 
>>> version are you using? What does your table look like? I just tried this on 
>>> a four-column datatable, and got no error.
>>>  
>>> - Sergey
>>>
>>>
>>> On Wed, Jul 24, 2013 at 6:24 AM, Rita <[email protected]> wrote:
>>>
>>>>  Hi,starting from one DataTable I want to group its rows on clicking 
>>>> event.I am trying to use the function google.visualization.data.**grou*
>>>> *p() with this code :
>>>> var newtable = google.visualization.data.
>>>> **group(
>>>>                               ****      table,
>>>>                               ****      [0],
>>>>                               ****      [{'column': 1, 'aggregation': 
>>>> google.visualization.data.sum, 'type': 'number'},
>>>>                               ****          {'column': 2, 
>>>> 'aggregation': google.visualization.data.sum, 'type': 'number'},
>>>>                               ****          {'column': 3, 
>>>> 'aggregation': google.visualization.data.sum, 'type': 'number'}]
>>>>                               ****      );
>>>>
>>>> But  firebug show me this error:
>>>>
>>>>
>>>> TypeError: a[Bb] is not a function
>>>>
>>>> In detail the portion of code is: 
>>>>
>>>>
>>>> ("google.visualization.data.**gr**oup",function(a,b,c){**function 
>>>> d(a,b,c,d){return b[I](m,c[E](d,a))}var f=[],h=[];Bo(b,function(a){if(*
>>>> ***Rn(a))f[y](a);else if(Kn(a)==xl){var b=a.column;il in 
>>>> a&&h[y]([b,{calc:Zn(d,b,a.**modi**fier),type:a[B],label:a[**Ec],**id:
>>>> a.id}]);f[y](b)}});if(**0!=h[**F]){for(var l=new google[H][Nd](a),q=l.*
>>>> *getViewCo**lumns(),u=a[ud](),C=**0;C<u;C++)**Bo(h,function(a){q[**
>>>> a[0]]=a[1]}**);l[Gc](q);a=l}var D=new google[H].DataTable,N=[];Bo(f,***
>>>> *function(c,d){var f=a[Bb](c),h=b[d][Ec]||a[bd](**c**);D[Xd](f,h,b[d].id); 
>>>>
>>>> N[y](f)});c=c||[];Bo(c,**functio**n(b){var 
>>>> c=b.column,c=b[Ec]||a[bd](c);**D**[Xd](b[B],c,b.id)});var 
>>>> da=[];Bo(f,function(a){da[y]({****column:a})});for(var 
>>>> La=a[dd](da),rb=[],ra=0;ra<c[**F**];ra++)rb[y]([]);for(ra=0;ra<**L**
>>>> a[F];ra++){Bo(c,function(b,c)**{**rb[c][y](a[E](La[ra],b.**column)**
>>>> )});l=n;if(ra<La[F]-1){**l=k;**for(u=0;u<f[F];u++){var 
>>>> C=a[E](La[ra],f[u]),Pb=a[E](**La**[ra+1],f[u]);if(0!=google[H]**.**
>>>> datautils.compareValues(N[u],**C**,Pb)){l=n;break}}}if(!l){var 
>>>> ha=D.addRow();Bo(f,function(b,****c){D[wd](ha,c,a[E](La[ra],b))}****);var 
>>>> ia= 
>>>> b[F];Bo(c,function(a,b){var c=a.aggregation[I](m,rb[b]);D[****
>>>> wd](ha,ia+b,c)});for(l=0;l<c[**F**];l++)rb[l]=[]}}return D}); 
>>>>
>>>> Anyone has ever got the same error?Can you suggest me how to solve?
>>>> Thanks in advance. 
>>>>
>>>> Regards,Rita
>>>>
>>>>  -- 
>>>> 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 google-visualization-api+**[email protected].
>>>> To post to this group, send email to google-visua...@**googlegroups.com
>>>> .
>>>>
>>>> Visit this group at http://groups.google.com/**
>>>> group/google-visualization-api<http://groups.google.com/group/google-visualization-api>
>>>> **.
>>>>
>>>> For more options, visit 
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>  
>>>>  
>>>>
>>>
>>>  -- 
>> 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]<javascript:>
>> .
>> To post to this group, send email to 
>> [email protected]<javascript:>
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

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