I wrote an example that does this: http://jsfiddle.net/asgallant/R9Fz4/

In the example, I use a dummy chart as a intermediate between the control 
and the chart, but you won't need to since you already have a Table filling 
that role.  The important part is at the end:

// create event handler for updating the chart
google.visualization.events.addListener(dummy, 'ready', function () {
    // get the filtered DataTable
    var newData = dummy.getDataTable();
    // group Y by X
    var grouped = google.visualization.data.group(newData, [1], [{
        column:2,
        aggregation: google.visualization.data.sum,
        type:'number'
    }]);
    // set the DataTable for the chart
    chart.setDataTable(grouped);
    // draw the chart
    chart.draw();
});

// Create a dashboard
new google.visualization.Dashboard(document.getElementById('dashboard')).
// bin the control to the dummy chart
bind([control], [dummy]).
// Draw the dashboard
draw(data);

You need to replace instances of "dummy" with your Table's ChartWrapper and 
"chart" with your PieChart's ChartWrapper.  Bind only the Table (and any 
other visualizations that you don't need to group data for) to the 
Dashboard; the PieChart will get its data from the Table.

On Wednesday, July 23, 2014 1:40:01 PM UTC-4, saKw wrote:
>
>       *PIN * 
>  
> *TYPES* 
>  
> *MINUse* 
>   
> 00123
>  
> Sleep (21.51%)
>  
> 40274
>   
> 00123
>  
> Unknown (19.75%)
>  
> 36993
>   
> 00123
>  
> Exercise (13.89%)
>  
> 26012
>   
> 00123
>  
> Email & messaging (6.91%)
>  
> 12943
>   
> 45000
>  
> Sleep (0.47%)
>  
> 882
>   
> 45000
>  
> Unknown (0.77%)
>  
> 1433
>   
> 45000
>  
> Exercise (0.04%)
>  
> 76
>   
> 45000
>  
> Email & messaging (2.94%)
>  
> 5503
>     
> Hi,
>
> I have a Google visualization dashboard with a table (as a chart wrapper) 
> a categoryfilter (as a controlwrapper).
>
> The dashboard works fine.
>
> My Table looks like this.
>
> I have created pieChart using TYPES and MINUse values from the table and 
> the PIN as Category picker.
>
> As you can see for every PIN the TYPES are repeating . And in my pie chart 
> I see repeating TYPEs. But what  I want is when the Category picker value 
> is ‘Choose a Value’ the MINUse will be sum of all MINUse for that 
> perticular TYPEs, for example, for ‘sleep’ Type ,instead of displaying  2 
> chart sections in the pie chart for  
>   
> 00123
>  
> Sleep (21.51%)
>   
>  and 
>   
> 45000
>  
> Sleep (0.47%)
>   
> There would be only one  pie section for sleep (40274+882=41156).
>
>  
>
> And when I will select individual PIN I will see the TYPES related to 
> this. (Which is working now.)
>
> Hope I explained it properly.
>
> I Really need help on this.
>

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