【发布时间】:2010-04-17 17:24:50
【问题描述】:
我必须在 X 轴上显示日期,在 Y 轴上显示 Amt。将有 8 行(系列),每行包含 n 个月的数据。 当我绘制图表时,我肯定会发送 6 个月的数据。(一行的数据如下所示)
[1251701950000, 34.50553] [1254294030000, 27.014463] [1256972350000, 26.7805] [1259567970000, 33.08871] [1262246430000, 51.987762] [1264924750000, 56.868233]
但是图表显示如下http://twitpic.com/1gbb7m
第一个月标签缺失,上个月没有正确对齐,我的flot js代码如下
$.plot($("#lgdGraphTab"),graphData, {
xaxis: {
mode: "time",
timeformat: "%b-%y",
monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
minTickSize: [1, "month"]
},
yaxis : {
tickSize: 5
},
series: {
lines: { show: true , shadowSize:0},
points: { show: true }
},
legend:{
container: $('#legendArea'),
noColumns:8
},
clickable: true,
hoverable: true
});
【问题讨论】: