UNPKG

991 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Linear = void 0;
4const util_1 = require("@antv/util");
5const continuous_1 = require("./continuous");
6const utils_1 = require("../utils");
7const d3_ticks_1 = require("../tick-methods/d3-ticks");
8/**
9 * Linear 比例尺
10 *
11 * 构造可创建一个在输入和输出之间具有线性关系的比例尺
12 */
13class Linear extends continuous_1.Continuous {
14 getDefaultOptions() {
15 return {
16 domain: [0, 1],
17 range: [0, 1],
18 unknown: undefined,
19 nice: false,
20 clamp: false,
21 round: false,
22 interpolate: utils_1.createInterpolateValue,
23 tickMethod: d3_ticks_1.d3Ticks,
24 tickCount: 5,
25 };
26 }
27 chooseTransforms() {
28 return [util_1.identity, util_1.identity];
29 }
30 clone() {
31 return new Linear(this.options);
32 }
33}
34exports.Linear = Linear;
35//# sourceMappingURL=linear.js.map
\No newline at end of file