1
我想在graphael圖表中使用日期,如下所示。如何在x軸上有不同的值,以及在graphael上有不同的標籤?
var lines = r.linechart(30, 30, 600, 440, [
[01/01/2014 12: 00: 00, 02/01/2014 12: 00: 00, 03/01/2014 12: 00: 00, 04/01/2014 12: 00: 00, 05/01/2014 12: 00: 00]
], [
[100, 150, 130, 85, 100]
], {
axisxstep: 20,
nostroke: false,
axis: "0 0 1 1",
symbol: "circle",
smooth: true
}).hoverColumn(function() {
this.tags = r.set();
for (var i = 0, ii = this.y.length; i < ii; i++) {
this.tags.push(r.tag(this.x, this.y[i], this.values[i], 160, 10).insertBefore(this).attr([{
fill: "#fff"
}, {
fill: this.symbols[i].attr("fill")
}]));
}
}, function() {
this.tags && this.tags.remove();
});
但是,graphael,似乎無法識別日期。如果我將這些值而不是日期設置爲1,2,3 ...,那麼以後如何在x軸上顯示日期標籤?
再次感謝