我必须在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
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6119 次 |
| 最近记录: |