DmitryBaranovskiy/g.raphael — Issue #129: barchart label not working in milestone 0.5
Author: germanftorres
Created: 2011-11-12 10:16:25+00:00
State: open

Hi!

I'm trying to label a single series barchart and it simply doesn't work. I have modified the barchart.html example trying to label the first

window.onload = function () {
var r = Raphael("holder"),
data1 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
data2 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
data3 = [[55, 20, 13, 32, 5, 1, 2, 10], [10, 2, 1, 5, 32, 13, 20, 55], [12, 20, 30]],
txtattr = { font: "12px 'Fontin Sans', Fontin-Sans, sans-serif" };

r.text(160, 10, "Single Series Chart").attr(txtattr);
r.text(480, 10, "Multiline Series Chart").attr(txtattr);
r.text(160, 250, "Multiple Series Stacked Chart").attr(txtattr);
r.text(480, 250, 'Multiline Series Stacked Vertical Chart. Type "round"').attr(txtattr);

var xchart = r.barchart(10, 10, 300, 220, [[55, 20, 13, 32, 5, 1, 2, 10]], 0, {type: "sharp"});
chart.label(["Uno", "Dos", "Tres", "Cuatro", "cinco", "seis", "Siete", "Ocho"]);

r.barchart(330, 10, 300, 220, data1);
r.barchart(10, 250, 300, 220, data2, {stacked: true});
r.barchart(330, 250, 300, 220, data3, {stacked: true, type: "round"});
};