问题描述
- 为什么ext.window里折线图不显示?新手求关照!
-
createfor: function(){
var ndtjStore = new Ext.data.JsonStore({fields:['name','num1','num2'],
data:[
{name:'一月',num1:350,num2:300},{name:'二月',num1:200,num2:150},
{name:'三月',num1:150,num2:200},
{name:'四月',num1:50,num2:10},
{name:'五月',num1:350,num2:400},
{name:'六月',num1:200,num2:150},
{name:'七月',num1:150,num2:100},
{name:'八月',num1:50,num2:100},
{name:'九月',num1:300,num2:300},
{name:'十月',num1:200,num2:250},
{name:'十一月',num1:150,num2:200},
{name:'十二月',num1:50,num2:100}
]
});
)
var win;
if(!win){
win = new Ext.Window({title:'折线图',
layout:'fit',
closeAction:'hide',
plain: true,
height:400,
width:850,
items:[{
xtype:'linechart',
url:contextPath+ '/resources/ext3/resources/charts.swf',
store:ndtjStore,
xfield: 'name',
renderTo: ndtjDiv,
//yField:'alarmCount',series: [
{type:'line',displayName: 'name',yField: 'num1',style: {color: 0x15428B}},
{type:'line',displayName: 'name',yField: 'num2',style: {color: 0x15428B}}]
}]
});