ラファエルチャートのラベルを取得しようとすると、次のエラーが発生します。
バー[i*(multi || 1)+j]は未定義です http:// localhost:8080 / en / plugins / SocialConversationPlugin / js / g.bar-min.js 149行目
この線 :
L = paper.g.text(bars[i * (multi || 1) + j].x, isBottom ? y + height - barvgutter / 2 : bars[i * (multi || 1) + j].y - 10, label).insertBefore(covers[i * (multi || 1) + j]);
私のコード:
$$("#activityTab td.month").each(function (s) {
labels.push(s.innerHTML);
});
var r = Raphael("holder",1000,260),
data2 = [ligne1, ligne2, ligne3],
fin = function () {
this.flag = r.g.popup(this.bar.x, this.bar.y, this.bar.value || "0").insertBefore(this);
},
fout = function () {
this.flag.animate({opacity: 0}, 300, function () {this.remove();});
};
r.g.txtattr.font = "12px 'Fontin Sans', Fontin-Sans, sans-serif";
r.g.text(562, 250, "Multiple Series Stacked Chart");
r.g.barchart(150, 10, 700, 220, data2, {stacked:false, type: "soft"})
.hover(fin, fout)
.label(labels);
チャートは描画されていますが、最初のラベルの最初の文字がチャートに描画されています。