Grouping the pies

Another useful feature is while you are analyzing your data using the pie chart, you may want to group multiple pies and get additional information; for example, what is the cumulative expense for the House Rent and Petrol. In this recipe, we will see how to put this in place.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.

How to do it...

Carry out the following steps:

  1. Edit the ch07_09.js file.
  2. Add the following interaction item into it:
    interactions: [{ type: 'piegrouping', listeners: { selectionchange: function(interaction, selectedItems) { var msg = selectedItems.length + ' items grouped!\nItems are: '; Ext.each(selectedItems, function(item, idx, allItems) ...

Get Sencha Touch Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.