日期:2014-05-16  浏览次数:20528 次

extjs 饼图不出效果!!!
还没完全用到项目中,是自己先试下的,居然效果出不来!!!


<title>项目概况图</title>
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />

  <!-- LIBS -->
  <script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
  <!-- ENDLIBS -->
  <script type="text/javascript" src="ext/ext-all.js"></script>
  <link rel="stylesheet" type="text/css" href="ext/shared/examples.css" />
<script>
Ext.chart.Chart.CHART_URL = 'ext/resources/charts.swf';
Ext.onReady(function(){
var store1 = new Ext.data.JsonStore({
autoDestroy:true,
  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: 'test',
  renderTo: 'container',
  items: {
  store: store1,
  xtype: 'piechart',
  dataField: 'total',
  categoryField: 'season',
  extraStyle:
  {
  legend:
  {
  display: 'bottom',
  padding: 5,
  font:
  {
  family: 'Tahoma',
  size: 13
  }
  }
  }
  }
  });
});
</script>

------解决方案--------------------
楼主 参照demo来做,注意js css 的引用路径
------解决方案--------------------
...别是flash没装吧。。。