UNPKG

790 BTypeScriptView Raw
1import { Threshold } from './threshold';
2import { QuantizeOptions, Range } from '../types';
3/**
4 * 类似 Threshold 比例尺,区别在于 thresholds 是根据连续的 domain 根据离散的 range 的数量计算而得到的。
5 */
6export declare class Quantize extends Threshold<QuantizeOptions> {
7 private thresholds;
8 protected getDefaultOptions(): QuantizeOptions;
9 constructor(options?: QuantizeOptions);
10 protected getDomain(): number[];
11 protected nice(): void;
12 getTicks(): number[];
13 protected getTickMethodOptions(): number[];
14 protected rescale(): void;
15 /**
16 * 如果是在第一段后或者最后一段就把两端的值添加上
17 */
18 invert(y: Range<QuantizeOptions>): number[];
19 getThresholds(): number[];
20 clone(): Quantize;
21}