Switching between stacked and grouped orientation

In previous recipes, we saw how to get grouped bars in a bar or a column chart. The Sencha Touch Chart framework provides functionality where using one of the tap events, the grouped bars can be converted into stacked bars and vice versa. This recipe will show how to use that functionality.

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 our the following steps:

  1. Edit the ch07_06.js file and add the interactions properties, highlighted in bold, to the chart object as follows:
     var chart = new Ext.chart.Chart({ fullscreen: true, width: 500, height: 300, animate: true, store: store, axes: [………………], series: [……………], ...

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.