UNPKG

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