UNPKG

953 BTypeScriptView Raw
1import { Base } from './base';
2import { IdentityOptions, Domain, Range } from '../types';
3export declare class Identity extends Base<IdentityOptions> {
4 /**
5 * 返回需要覆盖的默认选项
6 * @returns 需要覆盖的默认选项
7 */
8 protected getDefaultOptions(): IdentityOptions;
9 /**
10 * 输入和输出满足:y = x
11 * @param x 输入值
12 * @returns 输出值
13 */
14 map(x: Domain<IdentityOptions>): any;
15 /**
16 * map 的逆运算:x = y,在这里和 map 是相同方法
17 * @param x 输出值
18 * @returns 输入值
19 */
20 invert(x: Range<IdentityOptions>): any;
21 /**
22 * 克隆 Identity Scale
23 * @returns 拥有相同选项且独立的 Identity Scale
24 */
25 clone(): Identity;
26 /**
27 * 根据比例尺的配置去生成 ticks,该 ticks 主要用于生成坐标轴
28 * @returns 返回一个 ticks 的数组
29 */
30 getTicks(): Range<IdentityOptions>[];
31}