1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var tslib_1 = require("tslib");
|
4 | var color_util_1 = require("@antv/color-util");
|
5 | var util_1 = require("@antv/util");
|
6 | var base_1 = require("./base");
|
7 | var Color = (function (_super) {
|
8 | tslib_1.__extends(Color, _super);
|
9 | function Color(cfg) {
|
10 | var _this = _super.call(this, cfg) || this;
|
11 | _this.type = 'color';
|
12 | _this.names = ['color'];
|
13 | if (util_1.isString(_this.values)) {
|
14 | _this.linear = true;
|
15 | }
|
16 | _this.gradient = color_util_1.default.gradient(_this.values);
|
17 | return _this;
|
18 | }
|
19 | |
20 |
|
21 |
|
22 | Color.prototype.getLinearValue = function (percent) {
|
23 | return this.gradient(percent);
|
24 | };
|
25 | return Color;
|
26 | }(base_1.default));
|
27 | exports.default = Color;
|
28 |
|
\ | No newline at end of file |