--- /dev/null
+<html>\r
+<head>\r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js">Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';\r
+\r
+Ext.onReady(function(){\r
+ var store = new Ext.data.JsonStore({\r
+ fields: ['season', 'total'],\r
+ data: [{\r
+ season: 'Summer',\r
+ total: 150\r
+ },{\r
+ season: 'Fall',\r
+ total: 245\r
+ },{\r
+ season: 'Winter',\r
+ total: 117\r
+ },{\r
+ season: 'Spring',\r
+ total: 184\r
+ }]\r
+ });\r
+ \r
+ new Ext.Panel({\r
+ width: 400,\r
+ height: 400,\r
+ title: 'Pie Chart with Legend - Favorite Season',\r
+ renderTo: 'container',\r
+ items: {\r
+ store: store,\r
+ xtype: 'piechart',\r
+ dataField: 'total',\r
+ categoryField: 'season',\r
+ //extra styles get applied to the chart defaults\r
+ extraStyle:\r
+ {\r
+ legend:\r
+ {\r
+ display: 'bottom',\r
+ padding: 5,\r
+ font:\r
+ {\r
+ family: 'Tahoma',\r
+ size: 13\r
+ }\r
+ }\r
+ }\r
+ }\r
+ });\r
+});</pre> \r
+</body>\r
+</html>
\ No newline at end of file