1
我正在使用graphael的線條圖。我的數據點是日期,這是graphael無法識別的。所以我用1,2,3代表了每一個日期....如何在graphael中擁有不同的價值觀和不同的標籤?
事實是,我需要在我的圖表上顯示日期,作爲x軸標籤。我該怎麼做?我試過標籤屬性,但它不起作用。
我的代碼如下所示:
var lines = r.linechart(30, 30, 600, 440,[[1,2,3,4,5]],[[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();
});