2
我可以使用gRaphael顯示線條圖,但我遇到工具提示問題。工具提示僅針對特定列顯示,而不是全部列。我不知道數據是否太多,但207列不應該太差。畫布尺寸爲900x300。以下是示例代碼....任何幫助將非常感謝!問題與gRaphael上顯示hoverColumn和tootip?
謝謝,
var r = Raphael('lgraph');
//Some code here to prep dates, x, prep ccp, ctr, searchp arrays
var linec = r.linechart(10,10,900,300,x,[ccp,ctr,searchp],
{ nostroke: false,
axis: "0 0 1 1",
symbol: "circle",
axisxlabels: dates,
axisxtype: " ",
smooth: true })
linec.hoverColumn(function() {
this.popups = r.set();
for (var i = 0, ii = this.y.length; i < ii; i++) {
this.popups.push(r.popup(this.x, this.y[i], this.values[i]).insertBefore(this));
}
}, function() {
this.popups && this.popups.remove();
});
linec.symbols.attr({ r: 3 });
謝謝!它完全奏效。 :) – yangtheman 2012-04-05 06:06:54