UNPKG

suoqiu-f2

Version:

Charts for mobile visualization.

31 lines (29 loc) 1.11 kB
"use strict"; exports.__esModule = true; exports["default"] = void 0; var _base = _interopRequireDefault(require("./base")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); } function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } var Shape = /*#__PURE__*/function (_Base) { function Shape(cfg) { var _this; _this = _Base.call(this, cfg) || this; _this.names = ['shape']; _this.type = 'shape'; _this.gradient = null; return _this; } /** * @override */ _inheritsLoose(Shape, _Base); var _proto = Shape.prototype; _proto.getLinearValue = function getLinearValue(percent) { var values = this.values; var index = Math.round((values.length - 1) * percent); return values[index]; }; return Shape; }(_base["default"]); var _default = exports["default"] = Shape;