nuke-biz-custom-chart
Version:
custom-chart
37 lines (27 loc) • 1 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 Line = function Line() {
_classCallCheck(this, Line);
};
Line.draw = function (chart, props) {
var position = props.position,
color = props.color,
shape = props.shape,
size = props.size;
var line = chart.line();
position && line.position(position);
// color && line.color(color);
if (Array.isArray(color)) {
line.color.apply(line, _toConsumableArray(color));
} else if (color) {
line.color(color);
}
size && line.size(size);
shape && line.shape(shape);
};
exports.default = Line;
module.exports = exports["default"];