* 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 : {});
stacktotal = [],
multi = 0,
colors = opts.colors || chartinst.colors,
- forceColor = opts.foreColor || false,
len = values.length;
}
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 = 'blue';
+ var color = colors[multi ? j : i%colors.length];
var h = Math.round((multi ? values[j][i] : values[i]) * Y),
top = y + height - barvgutter - h,