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.
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Carry out the following steps:
Edit the
ch07_09.js
file.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) { msg += ' - ' + item.storeItem.data.name; }); Ext.Msg.alert('INFO', msg); } } }]
Save the changes.
Deploy and access the application from the browser. You may also run it using the emulator.
Tap a...