3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
15 Ext.require('Ext.chart.*');
16 Ext.require(['Ext.Window', 'Ext.fx.target.Sprite', 'Ext.layout.container.Fit']);
18 Ext.onReady(function () {
19 store1.loadData(generateData(5, 20));
21 var win = Ext.create('Ext.Window', {
28 title: 'Pie Renderer Chart',
29 renderTo: Ext.getBody(),
34 store1.loadData(generateData(5));
40 style: 'background:#fff',
47 angleField: 'data1', //bind angle span to visits
48 lengthField: 'data2', //bind pie slice length to views
55 field: 'name', //bind label text to name
56 display: 'rotate', //rotate labels (also middle, out).
65 renderer: function(sprite, record, attr, index, store) {
66 var value = (record.get('data1') >> 0) % 9;
67 var color = [ "#94ae0a", "#115fa6","#a61120", "#ff8809", "#ffd13e", "#a61187", "#24ad9a", "#7c7474", "#a66111"][value];
68 return Ext.apply(attr, {