UNPKG

847 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4var base_1 = require("./base");
5/**
6 * 线性度量
7 * @class
8 */
9var Linear = /** @class */ (function (_super) {
10 tslib_1.__extends(Linear, _super);
11 function Linear() {
12 var _this = _super !== null && _super.apply(this, arguments) || this;
13 _this.type = 'linear';
14 _this.isLinear = true;
15 return _this;
16 }
17 Linear.prototype.invert = function (value) {
18 var percent = this.getInvertPercent(value);
19 return this.min + percent * (this.max - this.min);
20 };
21 Linear.prototype.initCfg = function () {
22 this.tickMethod = 'wilkinson-extended';
23 this.nice = false;
24 };
25 return Linear;
26}(base_1.default));
27exports.default = Linear;
28//# sourceMappingURL=linear.js.map
\No newline at end of file