source: trunk/web/addons/job_monarch/lib/extjs-30/examples/chart/pie-chart.js @ 625

Last change on this file since 625 was 625, checked in by ramonb, 15 years ago

lib/extjs-30:

  • new ExtJS 3.0
File size: 1.3 KB
Line 
1/*!
2 * Ext JS Library 3.0.0
3 * Copyright(c) 2006-2009 Ext JS, LLC
4 * licensing@extjs.com
5 * http://www.extjs.com/license
6 */
7Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';
8
9Ext.onReady(function(){
10    var store = new Ext.data.JsonStore({
11        fields: ['season', 'total'],
12        data: [{
13            season: 'Summer',
14            total: 150
15        },{
16            season: 'Fall',
17            total: 245
18        },{
19            season: 'Winter',
20            total: 117
21        },{
22            season: 'Spring',
23            total: 184
24        }]
25    });
26   
27    new Ext.Panel({
28        width: 400,
29        height: 400,
30        title: 'Pie Chart with Legend - Favorite Season',
31        renderTo: 'container',
32        items: {
33            store: store,
34            xtype: 'piechart',
35            dataField: 'total',
36            categoryField: 'season',
37            //extra styles get applied to the chart defaults
38            extraStyle:
39            {
40                legend:
41                {
42                    display: 'bottom',
43                    padding: 5,
44                    font:
45                    {
46                        family: 'Tahoma',
47                        size: 13
48                    }
49                }
50            }
51        }
52    });
53});
Note: See TracBrowser for help on using the repository browser.