pie-chart.js
资源名称:ext-3.0.0.zip [点击查看]
上传用户:shuoshiled
上传日期:2018-01-28
资源大小:10124k
文件大小:1k
源码类别:
中间件编程
开发平台:
JavaScript
- /*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ 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
- }
- }
- }
- }
- });
- });