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();
});