Ext
//定義store
var chartStore = new Ext
root:
fields:[
{name:
{name:
{name:
]
sortInfo:{field:
});
//測試數據
var obj={
root:[
{ne:
{ne:
{ne:
{ne:
{ne:
{ne:
{ne:
{ne:
{ne:
]
}
//載入數據
chartStore
//pushlet 回調函數
window
//alert(event
var obj
//obj=obj
//chartStore
}
// 系統屬性定義列數據模型
var cm = new Ext
{header:
{header:
var confine = record
/*if(value>=confine){
//cellMeta
var row = cm
row
}*/
return value;
}}
{header:
//{header:
]);
var grid = new Ext
title:
cm:cm
store:chartStore
sm : new Ext
singleSelect : true
})
stripeRows:true
loadMask:true
clicksToEdit :
enableColumnMove : false
trackMouseOver : false
stripeRows:true
frame:true
loadMask:{
msg:"數據加載中
}
viewConfig:{
forceFit:true
columnsText:
scrollOffset:
sortAscText:
sortDescText:
}
autoExpandColumn:
bbar:new Ext
pageSize:
store:chartStore
displayInfo:true
displayMsg:
emptyMsg:
})
viewConfig:{forceFit:true
getRowClass : function(record
if(record
return
}
}
}
});
var linechart = new Ext
title:
xtype:
url: AIUPP_ROOT+
store:chartStore
//xField:
//yField:
//定義tip內容
tipRenderer : function(chart
//alert(record
var ne = record
var str = String
return str;
}
//定義兩個圖表
series: [{
type:
displayName:
id:"billId"
xField:
yField:
style: {
color:
size:
}
}
type:
displayName:
xField:
yField:
style: {
color:
size:
}
}]
listeners:{
"show":function(){
var c = linechart
//alert(c[
//c[
}
}
//定義圖表樣式
chartStyle: {
legend:{
display: "top"
}
xAxis: {
color:
majorTicks: {color:
minorTicks: {color:
majorGridLines:{size:
}
yAxis: {
color:
majorTicks: {color:
minorTicks: {color:
majorGridLines: {size:
}
}
});
var contentPanel = new Ext
region:
enableTabScroll:true
activeTab:
closable:false
split : false
collapsible : false
layoutOnTabChange:true
items:[linechart
});
// 間隔時間
var interval = new Ext
name:
fieldLabel:
id:"searchInterval"
});
// 分組方式
var groupType = new Ext
name:
fieldLabel:
id:"searchGroupType"
items:[
new Ext
name:"groupType"
inputValue:"
boxLabel:"地區"
})
new Ext
name:"groupType"
inputValue:"
boxLabel:"地區+網元"
})
new Ext
name:"groupType"
inputValue:"
boxLabel:"地區+網元+業務代碼"
})
]
});
// 開始按鈕
var startBtn = new Ext
text:
minWidth:
handler:function(){
//store
}
});
// 停止按鈕
var stopBtn = new Ext
text:
minWidth:
handler:function(){
//store
}
});
var searchPanel = new Ext
labelAlign:
labelWidth:
frame:true
layout:
items:[
{columnWidth:
{columnWidth:
{columnWidth:
{columnWidth:
]
});
var vp = new Ext
layout:
border:false
hideBorders:true
bufferResize:
items:[
//{region:
{region:
]
});
vp
});
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19845.html