X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/docs/source/pie-chart.html?ds=inline diff --git a/docs/source/pie-chart.html b/docs/source/pie-chart.html new file mode 100644 index 00000000..72db9345 --- /dev/null +++ b/docs/source/pie-chart.html @@ -0,0 +1,56 @@ + + + The source code + + + + +
Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';
+
+Ext.onReady(function(){
+    var store = new Ext.data.JsonStore({
+        fields: ['season', 'total'],
+        data: [{
+            season: 'Summer',
+            total: 150
+        },{
+            season: 'Fall',
+            total: 245
+        },{
+            season: 'Winter',
+            total: 117
+        },{
+            season: 'Spring',
+            total: 184
+        }]
+    });
+    
+    new Ext.Panel({
+        width: 400,
+        height: 400,
+        title: 'Pie Chart with Legend - Favorite Season',
+        renderTo: 'container',
+        items: {
+            store: store,
+            xtype: 'piechart',
+            dataField: 'total',
+            categoryField: 'season',
+            //extra styles get applied to the chart defaults
+            extraStyle:
+            {
+                legend:
+                {
+                    display: 'bottom',
+                    padding: 5,
+                    font:
+                    {
+                        family: 'Tahoma',
+                        size: 13
+                    }
+                }
+            }
+        }
+    });
+});
+ + \ No newline at end of file