~cdparra/gelee/trunk

« back to all changes in this revision

Viewing changes to webui/ecosystem/workspace/extjs/docs/source/pie-chart.html

  • Committer: parra
  • Date: 2010-03-15 15:56:56 UTC
  • Revision ID: svn-v4:ac5bba68-f036-4e09-846e-8f32731cc928:trunk/gelee:1448
merged gelee at svn

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
  <title>The source code</title>
 
4
    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
 
5
    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
 
6
</head>
 
7
<body  onload="prettyPrint();">
 
8
    <pre class="prettyprint lang-js">Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';
 
9
 
 
10
Ext.onReady(function(){
 
11
    var store = new Ext.data.JsonStore({
 
12
        fields: ['season', 'total'],
 
13
        data: [{
 
14
            season: 'Summer',
 
15
            total: 150
 
16
        },{
 
17
            season: 'Fall',
 
18
            total: 245
 
19
        },{
 
20
            season: 'Winter',
 
21
            total: 117
 
22
        },{
 
23
            season: 'Spring',
 
24
            total: 184
 
25
        }]
 
26
    });
 
27
    
 
28
    new Ext.Panel({
 
29
        width: 400,
 
30
        height: 400,
 
31
        title: 'Pie Chart with Legend - Favorite Season',
 
32
        renderTo: 'container',
 
33
        items: {
 
34
            store: store,
 
35
            xtype: 'piechart',
 
36
            dataField: 'total',
 
37
            categoryField: 'season',
 
38
            //extra styles get applied to the chart defaults
 
39
            extraStyle:
 
40
            {
 
41
                legend:
 
42
                {
 
43
                    display: 'bottom',
 
44
                    padding: 5,
 
45
                    font:
 
46
                    {
 
47
                        family: 'Tahoma',
 
48
                        size: 13
 
49
                    }
 
50
                }
 
51
            }
 
52
        }
 
53
    });
 
54
});</pre>    
 
55
</body>
 
56
</html>
 
 
b'\\ No newline at end of file'