* Copyright (c) 2009-2012 Dmitry Baranovskiy (http://g.raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
-Raphael = typeof(Raphael) != 'undefined' ? Raphael : (imports ? imports.seed.Raphael.Raphael : {});
-Roo = typeof(Roo) != 'undefined' ? Roo: (imports ? imports.seed.Roo.Roo: {});
+
+if (typeof(Raphael) == 'undefined') {
+ // support for seed/simple browser usage
+ importz = imports['seed/importz.js'].importz;
+
+ Raphael = importz('Raphael');
+ Roo = importz('Roo');
+}
+
+
//chartinst = typeof(chartinst) != 'undefined' ? chartinst: (imports ? imports.chartinst.chartinst : {});
}
opts.axis = opts.axis || "";
-
var allx = Array.prototype.concat.apply([], opts.xvalues),
ally = Array.prototype.concat.apply([], opts.yvalues),
for (var j = 0; j < (multi || 1); j++) {
//Roo.log( [ 'vbar-loop', multi ? values[j][i] : values[i], Y]);
-
+ var color = colors[multi ? j : i%colors.length];
var h = Math.round((multi ? values[j][i] : values[i]) * Y),
top = y + height - barvgutter - h,
- bar = finger(Math.round(X + barwidth / 2), top + h, barwidth, h, true, type, null, paper).attr({ stroke: "none", fill: colors[multi ? j : i] });
+ bar = finger(Math.round(X + barwidth / 2), top + h, barwidth, h, true, type, null, paper).attr({ stroke: "none", fill: color });
//Roo.log([y , height , barvgutter ,h]);
if (multi) {
if (opts.axis) {
var axis = paper.set();
-
+ // Roo.log(opts.axis);
+
+
+
// top axis
+ax[0] && axis.push(
loffset : Math.round(barhgutter + (barwidth / 2.0)),
roffset : Math.round(barhgutter + (barwidth / 2.0))
};
- Roo.log('ax_args');
- Roo.log(ax_args);
- Roo.log('end');
+ //Roo.log(ax_args);
+ax[2] && axis.push(
// bottom
// x, y, length, from, to, steps, orientation, labels, type, dashsize, paper
x + gutter,
y + height - gutter,
height - 2 * gutter,
- 0,
+ miny,
maxy ,
opts.axisystep,
1,
paper
));
-
}