nuke-biz-custom-chart
Version:
custom-chart
39 lines (28 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Pie = function Pie() {
_classCallCheck(this, Pie);
};
Pie.draw = function (chart, props) {
var position = props.position,
color = props.color,
theme = props.theme;
var pie = chart.intervalStack();
position && pie.position(position);
// color && pie.color(color);
if (Array.isArray(color)) {
pie.color.apply(pie, _toConsumableArray(color));
} else if (color) {
if (Array.isArray(theme)) {
pie.color(color, theme);
} else {
pie.color(color);
}
}
};
exports.default = Pie;
module.exports = exports["default"];