ext中折线图的问题,求大神解答

断笔写沧桑 2015-10-16 03:20:52


从后台读取两条数据,做折线图,一条对应横轴的 “10”,一条对应横轴的 “11”,但在前台显示的时候,数据对应不上而且横轴多显示了 “12”,这是怎么回事,求解??????????????????
代码如下:
model:
Ext.define('CheckHealthModel',{
extend:'Ext.data.Model',
fields:[ {
//id
name:'id',
type:"int",
useNull:true
},{
//检测结果
name:'resultValue',
type:"double",
useNull:true
},{
//创建时间
name: 'createTime',
type: 'date',
useNull: true,
dateFormat: 'time'
}]

});


var store =Ext.create('Ext.ux.store.PrivateStore', {
storeId : 'healthStores',
baseUrl : 'rest/checkHistory',
model:CheckHealthModel,
autoLoad:false
}); //store是从后台动态加载的

var extchart = Ext.create('Ext.chart.Chart', {
renderTo: Ext.getBody(),
store: store,
animate: true,
shadow: true,
axes: [{
title: '血压',
type: 'Numeric',
position: 'left',
fields: ['resultValue'],
grid: true,
minimum: 40,
maximum: 180
},
{
title: '时间',
type: 'Time',
position: 'bottom',
fields: 'createTime',
groupBy: 'day',
grid: true,
dateFormat: 'd'
}],
series: [{
type: 'line',
axis: 'left',
xField: 'createTime',
yField: 'resultValue',
style: {
color: 'blue'
}
}]
});
...全文
67 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
断笔写沧桑 2015-10-16
  • 打赏
  • 举报
回复
求解,求解,求解

87,904

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧