I'm thinking of use Extjs Chart to make many curves, and now the problem is Y axises are at the same parameter, but the X axises are difrerent.my code follow:
var chartStore = new Ext.data.JsonStore({
root:'data',
fields:[
{
//似乎有bug,labelfunction不好用,就自己处理一个field来当x轴标签
name:'testss1',
mapping:'testss1',
convert:function(v,record){
return Date.parseDate(v, 'Y-m-d H:i').format('y-m-d');
}
},{
//似乎有bug,labelfunction不好用,就自己处理一个field来当x轴标签
name:'testss2',
mapping:'testss2',
convert:function(v,record){
return Date.parseDate(v, 'Y-m-d H:i').format('y-m-d');
}
},
{name:'testss1',type:'date',dateFormat:'Y-m-d H:i'},
{name:'testss2',type:'date',dateFormat:'Y-m-d H:i'},
{name:'testss3',type:'int'},
/* {name:'startTime',type:'date',dateFormat:'Y-m-d H:i'},
{name:'endTime',type:'date',dateFormat:'Y-m-d H:i'}, */
{name:'alarmCount',type:'int'},
{name:'eventCount',type:'int'}
]
/* sortInfo:{field: 'startTime', direction: 'ASC'} */
});

//测试数据
var obj={
interval:60,
data:[{testss1:'2009-06-22 00:15:00',testss2:'2009-06-22 00:45:00',testss3:44,startTime:'2009-06-22 00:00:00',endTime:'2009-06-22 00:59:00',alarmCount:12,eventCount:15},
{testss1:'2009-06-22 01:15:00',testss2:'2009-06-22 01:45:00',testss3:46,startTime:'2009-06-22 01:00:00',endTime:'2009-06-22 01:59:00',alarmCount:14,eventCount:15},
{testss1:'2009-06-22 02:15:00',testss2:'2009-06-22 02:45:00',testss3:48,startTime:'2009-06-22 02:00:00',endTime:'2009-06-22 02:59:00',alarmCount:16,eventCount:0},
{testss1:'2009-06-22 03:15:00',testss2:'2009-06-22 03:45:00',testss3:50,startTime:'2009-06-22 03:00:00',endTime:'2009-06-22 03:59:00',alarmCount:18,eventCount:15},
{testss1:'2009-06-22 04:15:00',testss2:'2009-06-22 04:45:00',testss3:52,startTime:'2009-06-22 04:00:00',endTime:'2009-06-22 04:59:00',alarmCount:20,eventCount:25},
{testss1:'2009-06-22 05:15:00',testss2:'2009-06-22 05:45:00',testss3:54,startTime:'2009-06-22 05:00:00',endTime:'2009-06-22 05:59:00',alarmCount:22,eventCount:15},
{testss1:'2009-06-22 06:15:00',testss2:'2009-06-22 06:45:00',testss3:56,startTime:'2009-06-22 06:00:00',endTime:'2009-06-22 06:59:00',alarmCount:24,eventCount:20},
{testss1:'2009-06-22 07:15:00',testss2:'2009-06-22 07:45:00',testss3:58,startTime:'2009-06-22 07:00:00',endTime:'2009-06-22 07:59:00',alarmCount:26,eventCount:0}
]
}

//载入数据
chartStore.loadData(obj);

// more complex with a custom look
var panel= new Ext.Panel({
iconCls:'chart',
title: 'ExtJS.com Visits and Pageviews, 2007/2008 (Full styling)',
// frame:true,
renderTo: document.body,
width:500,
id:'test1',
height:500,
layout:'fit',
items: [{
xtype:'linechart',
url: '/QT_CMS/ext/resources/charts.swf',
store:chartStore,
series: [{
type:'line',
//displayName: '告警',
yField: 'alarmCount',
xField: 'testss1'},{
type:'line',
// displayName: '11',
yField: 'alarmCount',
xField: 'testss2',
style: {
color: 0x15428B
} }]
}]
});
});
[IMG]file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/%60YD]B6ZLC%25XK1Y6C@BNRW_Q.jpg[/IMG]

in theory, my X axis have two horizontal times, and the times are in turn, but what i see from my picture are two separate curves, so here i want to ask for help,what is the problem? please help me ~