Когда я пытаюсь получить метки диаграмм Рафаэля, я получаю эту ошибку:
bars[i * (multi || 1) + j] is undefined
http://localhost:8080/en/plugins/SocialConversationPlugin/js/g.bar-min.js
Line 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);
Диаграмма нарисована, но я просто получаю первую букву первой метки, нарисованной на моем графике.