This recipe shows how to create a pie chart and work with some interesting features offered by the framework.
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Carry out the following steps:
Create and open a new file named
ch07_09.js
and paste the following code into it:Ext.setup({ onReady: function() { var store = new Ext.data.JsonStore(...); //defined in the Area Chart recipe var chart = new Ext.chart.Chart({ fullscreen: true, width: 500, height: 300, animate: true, store: store, legend: { position: { portrait: 'bottom', landscape: 'left' } }, series: [{ type: 'pie', angleField: 'data1', showInLegend: true, label: { field: 'name', display: 'rotate', font: '18px Arial' ...