PDA

View Full Version : Why touch charts and oppo-touching to take data from the Database has the problem?



citynong
24 Jul 2011, 6:28 PM
Why touch charts and oppo-touching to take data from the Database has the problem?
Not display charts?


Ext.regModel("signchart", {
fields : [ "lrsj", "field1", "field2", "field3" ]
});

sink.store1 = new Ext.data.JsonStore({
model : "signchart",
autoLoad : false,
proxy : {
type : "ajax",
url : "control?action=signServlet",
reader : {
type : "json"
}
}
});


var templine = 1;
demos.LineChart = function() {
sink.store1.load({
params:{temp:0,syxh:sink.Main.workPage.currentPatient.get("syxh")}
});
sink.Main.workPage.setActiveItem(
new Ext.chart.Panel({
title: 'Demo title',
width:700,
height:600,
items: {
cls: 'line1',
theme: 'Demo',
store: sink.store1,
animate: true,
shadow: true,
legend: {
position: 'right'
},
interactions: [
{
type: 'iteminfo',
listeners: {
show: function(interaction, item, panel) {
// var storeItem = item.storeItem;
//panel.update(['<ul><li><b>Month: </b>' + storeItem.get('name') + '</li>', '<li><b>Value: </b> ' + item.value[1] + '</li></ul>'].join(''));
}
}
}
],
axes: [
{
type: 'Numeric',
minimum: 0,
maximum: 100,
position: 'left',
fields: ['field1','field2','field3'],
title: 'demos',
minorTickSteps: 1
},
{
type: 'Category',
position: 'bottom',
fields: ['lrsj'],
title: 'date'
}
],
series: [
{
type: 'line',
highlight: {
size: 7,
radius: 7
},
fill: true,
smooth: true,
axis: 'left',
xField: 'lrsj',
yField: 'field1'
},
{
type: 'line',
highlight: {
size: 7,
radius: 7
},
axis: 'left',
smooth: true,
xField: 'lrsj',
yField: 'field2'
},
{
type: 'line',
highlight: {
size: 7,
radius: 7
},
axis: 'left',
smooth: true,
xField: 'lrsj',
yField: 'field3'
}
]
}
}), 'slide');
};