1 | interface GradientObject {
|
2 | id?: number;
|
3 | type: string;
|
4 | colorStops: GradientColorStop[];
|
5 | global?: boolean;
|
6 | }
|
7 | interface GradientColorStop {
|
8 | offset: number;
|
9 | color: string;
|
10 | }
|
11 | declare class Gradient {
|
12 | id?: number;
|
13 | type: string;
|
14 | colorStops: GradientColorStop[];
|
15 | global: boolean;
|
16 | constructor(colorStops: GradientColorStop[]);
|
17 | addColorStop(offset: number, color: string): void;
|
18 | }
|
19 |
|
20 | interface RadialGradientObject extends GradientObject {
|
21 | type: 'radial';
|
22 | x: number;
|
23 | y: number;
|
24 | r: number;
|
25 | }
|
26 | declare class RadialGradient extends Gradient {
|
27 | type: 'radial';
|
28 | x: number;
|
29 | y: number;
|
30 | r: number;
|
31 | constructor(x: number, y: number, r: number, colorStops?: GradientColorStop[], globalCoord?: boolean);
|
32 | }
|
33 |
|
34 | interface LinearGradientObject extends GradientObject {
|
35 | type: 'linear';
|
36 | x: number;
|
37 | y: number;
|
38 | x2: number;
|
39 | y2: number;
|
40 | }
|
41 | declare class LinearGradient extends Gradient {
|
42 | type: 'linear';
|
43 | x: number;
|
44 | y: number;
|
45 | x2: number;
|
46 | y2: number;
|
47 | constructor(x: number, y: number, x2: number, y2: number, colorStops?: GradientColorStop[], globalCoord?: boolean);
|
48 | }
|
49 |
|
50 | declare type Dictionary<T> = {
|
51 | [key: string]: T;
|
52 | };
|
53 | declare type ArrayLike$1<T> = {
|
54 | [key: number]: T;
|
55 | length: number;
|
56 | };
|
57 | declare type ImageLike = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
|
58 | declare type TextVerticalAlign = 'top' | 'middle' | 'bottom';
|
59 | declare type TextAlign = 'left' | 'center' | 'right';
|
60 | declare type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | number;
|
61 | declare type FontStyle = 'normal' | 'italic' | 'oblique';
|
62 | declare type BuiltinTextPosition = 'left' | 'right' | 'top' | 'bottom' | 'inside' | 'insideLeft' | 'insideRight' | 'insideTop' | 'insideBottom' | 'insideTopLeft' | 'insideTopRight' | 'insideBottomLeft' | 'insideBottomRight';
|
63 | declare type ZREventProperties = {
|
64 | zrX: number;
|
65 | zrY: number;
|
66 | zrDelta: number;
|
67 | zrEventControl: 'no_globalout' | 'only_globalout';
|
68 | zrByTouch: boolean;
|
69 | };
|
70 | declare type ZRRawMouseEvent = MouseEvent & ZREventProperties;
|
71 | declare type ZRRawTouchEvent = TouchEvent & ZREventProperties;
|
72 | declare type ZRRawPointerEvent = TouchEvent & ZREventProperties;
|
73 | declare type ZRRawEvent = ZRRawMouseEvent | ZRRawTouchEvent | ZRRawPointerEvent;
|
74 | declare type ElementEventName = 'click' | 'dblclick' | 'mousewheel' | 'mouseout' | 'mouseover' | 'mouseup' | 'mousedown' | 'mousemove' | 'contextmenu' | 'drag' | 'dragstart' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'drop' | 'globalout';
|
75 | declare type ElementEventNameWithOn = 'onclick' | 'ondblclick' | 'onmousewheel' | 'onmouseout' | 'onmouseup' | 'onmousedown' | 'onmousemove' | 'oncontextmenu' | 'ondrag' | 'ondragstart' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondrop';
|
76 | declare type PropType<TObj, TProp extends keyof TObj> = TObj[TProp];
|
77 | declare type FunctionPropertyNames<T> = {
|
78 | [K in keyof T]: T[K] extends Function ? K : never;
|
79 | }[keyof T];
|
80 | declare type MapToType<T extends Dictionary<any>, S> = {
|
81 | [P in keyof T]: T[P] extends Dictionary<any> ? MapToType<T[P], S> : S;
|
82 | };
|
83 | declare type KeyOfDistributive<T> = T extends unknown ? keyof T : never;
|
84 | declare type WithThisType<Func extends (...args: any) => any, This> = (this: This, ...args: Parameters<Func>) => ReturnType<Func>;
|
85 |
|
86 | declare type SVGVNodeAttrs = Record<string, string | number | undefined | boolean>;
|
87 | interface SVGVNode {
|
88 | tag: string;
|
89 | attrs: SVGVNodeAttrs;
|
90 | children?: SVGVNode[];
|
91 | text?: string;
|
92 | elm?: Node;
|
93 | key: string;
|
94 | }
|
95 |
|
96 | declare type ImagePatternRepeat = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
|
97 | interface PatternObjectBase {
|
98 | id?: number;
|
99 | type?: 'pattern';
|
100 | x?: number;
|
101 | y?: number;
|
102 | rotation?: number;
|
103 | scaleX?: number;
|
104 | scaleY?: number;
|
105 | }
|
106 | interface ImagePatternObject extends PatternObjectBase {
|
107 | image: ImageLike | string;
|
108 | repeat?: ImagePatternRepeat;
|
109 | imageWidth?: number;
|
110 | imageHeight?: number;
|
111 | }
|
112 | interface SVGPatternObject extends PatternObjectBase {
|
113 | svgElement?: SVGVNode;
|
114 | svgWidth?: number;
|
115 | svgHeight?: number;
|
116 | }
|
117 | declare type PatternObject = ImagePatternObject | SVGPatternObject;
|
118 |
|
119 | declare const nativeSlice: (start?: number, end?: number) => any[];
|
120 | declare function guid(): number;
|
121 | declare function logError(...args: any[]): void;
|
122 | declare function clone<T extends any>(source: T): T;
|
123 | declare function merge<T extends Dictionary<any>, S extends Dictionary<any>>(target: T, source: S, overwrite?: boolean): T & S;
|
124 | declare function merge<T extends any, S extends any>(target: T, source: S, overwrite?: boolean): T | S;
|
125 | declare function mergeAll(targetAndSources: any[], overwrite?: boolean): any;
|
126 | declare function extend<T extends Dictionary<any>, S extends Dictionary<any>>(target: T, source: S): T & S;
|
127 | declare function defaults<T extends Dictionary<any>, S extends Dictionary<any>>(target: T, source: S, overlay?: boolean): T & S;
|
128 | declare const createCanvas: () => HTMLCanvasElement;
|
129 | declare function indexOf<T>(array: T[] | readonly T[] | ArrayLike$1<T>, value: T): number;
|
130 | declare function inherits(clazz: Function, baseClazz: Function): void;
|
131 | declare function mixin<T, S>(target: T | Function, source: S | Function, override?: boolean): void;
|
132 | declare function isArrayLike(data: any): data is ArrayLike$1<any>;
|
133 | declare function each<I extends Dictionary<any> | any[] | readonly any[] | ArrayLike$1<any>, Context>(arr: I, cb: (this: Context, value: I extends (infer T)[] | readonly (infer T)[] | ArrayLike$1<infer T> ? T : I extends Dictionary<any> ? I extends Record<infer K, infer T> ? T : unknown : unknown, index?: I extends any[] | readonly any[] | ArrayLike$1<any> ? number : keyof I & string, arr?: I) => void, context?: Context): void;
|
134 | declare function map<T, R, Context>(arr: readonly T[], cb: (this: Context, val: T, index?: number, arr?: readonly T[]) => R, context?: Context): R[];
|
135 | declare function reduce<T, S, Context>(arr: readonly T[], cb: (this: Context, previousValue: S, currentValue: T, currentIndex?: number, arr?: readonly T[]) => S, memo?: S, context?: Context): S;
|
136 | declare function filter<T, Context>(arr: readonly T[], cb: (this: Context, value: T, index: number, arr: readonly T[]) => boolean, context?: Context): T[];
|
137 | declare function find<T, Context>(arr: readonly T[], cb: (this: Context, value: T, index?: number, arr?: readonly T[]) => boolean, context?: Context): T;
|
138 | declare function keys<T extends object>(obj: T): (KeyOfDistributive<T> & string)[];
|
139 | declare type Bind1<F, Ctx> = F extends (this: Ctx, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
140 | declare type Bind2<F, Ctx, T1> = F extends (this: Ctx, a: T1, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
141 | declare type Bind3<F, Ctx, T1, T2> = F extends (this: Ctx, a: T1, b: T2, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
142 | declare type Bind4<F, Ctx, T1, T2, T3> = F extends (this: Ctx, a: T1, b: T2, c: T3, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
143 | declare type Bind5<F, Ctx, T1, T2, T3, T4> = F extends (this: Ctx, a: T1, b: T2, c: T3, d: T4, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
144 | declare type BindFunc<Ctx> = (this: Ctx, ...arg: any[]) => any;
|
145 | interface FunctionBind {
|
146 | <F extends BindFunc<Ctx>, Ctx>(func: F, ctx: Ctx): Bind1<F, Ctx>;
|
147 | <F extends BindFunc<Ctx>, Ctx, T1 extends Parameters<F>[0]>(func: F, ctx: Ctx, a: T1): Bind2<F, Ctx, T1>;
|
148 | <F extends BindFunc<Ctx>, Ctx, T1 extends Parameters<F>[0], T2 extends Parameters<F>[1]>(func: F, ctx: Ctx, a: T1, b: T2): Bind3<F, Ctx, T1, T2>;
|
149 | <F extends BindFunc<Ctx>, Ctx, T1 extends Parameters<F>[0], T2 extends Parameters<F>[1], T3 extends Parameters<F>[2]>(func: F, ctx: Ctx, a: T1, b: T2, c: T3): Bind4<F, Ctx, T1, T2, T3>;
|
150 | <F extends BindFunc<Ctx>, Ctx, T1 extends Parameters<F>[0], T2 extends Parameters<F>[1], T3 extends Parameters<F>[2], T4 extends Parameters<F>[3]>(func: F, ctx: Ctx, a: T1, b: T2, c: T3, d: T4): Bind5<F, Ctx, T1, T2, T3, T4>;
|
151 | }
|
152 | declare const bind: FunctionBind;
|
153 | declare type Curry1<F, T1> = F extends (a: T1, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
154 | declare type Curry2<F, T1, T2> = F extends (a: T1, b: T2, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
155 | declare type Curry3<F, T1, T2, T3> = F extends (a: T1, b: T2, c: T3, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
156 | declare type Curry4<F, T1, T2, T3, T4> = F extends (a: T1, b: T2, c: T3, d: T4, ...args: infer A) => infer R ? (...args: A) => R : unknown;
|
157 | declare type CurryFunc = (...arg: any[]) => any;
|
158 | declare function curry<F extends CurryFunc, T1 extends Parameters<F>[0]>(func: F, a: T1): Curry1<F, T1>;
|
159 | declare function curry<F extends CurryFunc, T1 extends Parameters<F>[0], T2 extends Parameters<F>[1]>(func: F, a: T1, b: T2): Curry2<F, T1, T2>;
|
160 | declare function curry<F extends CurryFunc, T1 extends Parameters<F>[0], T2 extends Parameters<F>[1], T3 extends Parameters<F>[2]>(func: F, a: T1, b: T2, c: T3): Curry3<F, T1, T2, T3>;
|
161 | declare function curry<F extends CurryFunc, T1 extends Parameters<F>[0], T2 extends Parameters<F>[1], T3 extends Parameters<F>[2], T4 extends Parameters<F>[3]>(func: F, a: T1, b: T2, c: T3, d: T4): Curry4<F, T1, T2, T3, T4>;
|
162 |
|
163 | declare function isArray(value: any): value is any[];
|
164 | declare function isFunction(value: any): value is Function;
|
165 | declare function isString(value: any): value is string;
|
166 | declare function isStringSafe(value: any): value is string;
|
167 | declare function isNumber(value: any): value is number;
|
168 | declare function isObject<T = unknown>(value: T): value is (object & T);
|
169 | declare function isBuiltInObject(value: any): boolean;
|
170 | declare function isTypedArray(value: any): boolean;
|
171 | declare function isDom(value: any): value is HTMLElement;
|
172 | declare function isGradientObject(value: any): value is GradientObject;
|
173 | declare function isImagePatternObject(value: any): value is ImagePatternObject;
|
174 | declare function isRegExp(value: unknown): value is RegExp;
|
175 | declare function eqNaN(value: any): boolean;
|
176 | declare function retrieve<T>(...args: T[]): T;
|
177 | declare function retrieve2<T, R>(value0: T, value1: R): T | R;
|
178 | declare function retrieve3<T, R, W>(value0: T, value1: R, value2: W): T | R | W;
|
179 | declare type SliceParams = Parameters<typeof nativeSlice>;
|
180 | declare function slice<T>(arr: ArrayLike$1<T>, ...args: SliceParams): T[];
|
181 | declare function normalizeCssArray(val: number | number[]): number[];
|
182 | declare function assert(condition: any, message?: string): void;
|
183 | declare function trim(str: string): string;
|
184 | declare function setAsPrimitive(obj: any): void;
|
185 | declare function isPrimitive(obj: any): boolean;
|
186 | interface MapInterface<T, KEY extends string | number = string | number> {
|
187 | delete(key: KEY): boolean;
|
188 | has(key: KEY): boolean;
|
189 | get(key: KEY): T | undefined;
|
190 | set(key: KEY, value: T): this;
|
191 | keys(): KEY[];
|
192 | forEach(callback: (value: T, key: KEY) => void): void;
|
193 | }
|
194 | declare class HashMap<T, KEY extends string | number = string | number> {
|
195 | data: MapInterface<T, KEY>;
|
196 | constructor(obj?: HashMap<T, KEY> | {
|
197 | [key in KEY]?: T;
|
198 | } | KEY[]);
|
199 | hasKey(key: KEY): boolean;
|
200 | get(key: KEY): T;
|
201 | set(key: KEY, value: T): T;
|
202 | each<Context>(cb: (this: Context, value?: T, key?: KEY) => void, context?: Context): void;
|
203 | keys(): KEY[];
|
204 | removeKey(key: KEY): void;
|
205 | }
|
206 | declare function createHashMap<T, KEY extends string | number = string | number>(obj?: HashMap<T, KEY> | {
|
207 | [key in KEY]?: T;
|
208 | } | KEY[]): HashMap<T, KEY>;
|
209 | declare function concatArray<T, R>(a: ArrayLike$1<T>, b: ArrayLike$1<R>): ArrayLike$1<T | R>;
|
210 | declare function createObject<T>(proto?: object, properties?: T): T;
|
211 | declare function disableUserSelect(dom: HTMLElement): void;
|
212 | declare function hasOwn(own: object, prop: string): boolean;
|
213 | declare function noop(): void;
|
214 | declare const RADIAN_TO_DEGREE: number;
|
215 |
|
216 | declare const util_d_curry: typeof curry;
|
217 | declare const util_d_guid: typeof guid;
|
218 | declare const util_d_logError: typeof logError;
|
219 | declare const util_d_clone: typeof clone;
|
220 | declare const util_d_merge: typeof merge;
|
221 | declare const util_d_mergeAll: typeof mergeAll;
|
222 | declare const util_d_extend: typeof extend;
|
223 | declare const util_d_defaults: typeof defaults;
|
224 | declare const util_d_createCanvas: typeof createCanvas;
|
225 | declare const util_d_indexOf: typeof indexOf;
|
226 | declare const util_d_inherits: typeof inherits;
|
227 | declare const util_d_mixin: typeof mixin;
|
228 | declare const util_d_isArrayLike: typeof isArrayLike;
|
229 | declare const util_d_each: typeof each;
|
230 | declare const util_d_map: typeof map;
|
231 | declare const util_d_reduce: typeof reduce;
|
232 | declare const util_d_filter: typeof filter;
|
233 | declare const util_d_find: typeof find;
|
234 | declare const util_d_keys: typeof keys;
|
235 | type util_d_Bind1<F, Ctx> = Bind1<F, Ctx>;
|
236 | type util_d_Bind2<F, Ctx, T1> = Bind2<F, Ctx, T1>;
|
237 | type util_d_Bind3<F, Ctx, T1, T2> = Bind3<F, Ctx, T1, T2>;
|
238 | type util_d_Bind4<F, Ctx, T1, T2, T3> = Bind4<F, Ctx, T1, T2, T3>;
|
239 | type util_d_Bind5<F, Ctx, T1, T2, T3, T4> = Bind5<F, Ctx, T1, T2, T3, T4>;
|
240 | declare const util_d_bind: typeof bind;
|
241 | type util_d_Curry1<F, T1> = Curry1<F, T1>;
|
242 | type util_d_Curry2<F, T1, T2> = Curry2<F, T1, T2>;
|
243 | type util_d_Curry3<F, T1, T2, T3> = Curry3<F, T1, T2, T3>;
|
244 | type util_d_Curry4<F, T1, T2, T3, T4> = Curry4<F, T1, T2, T3, T4>;
|
245 | declare const util_d_isArray: typeof isArray;
|
246 | declare const util_d_isFunction: typeof isFunction;
|
247 | declare const util_d_isString: typeof isString;
|
248 | declare const util_d_isStringSafe: typeof isStringSafe;
|
249 | declare const util_d_isNumber: typeof isNumber;
|
250 | declare const util_d_isObject: typeof isObject;
|
251 | declare const util_d_isBuiltInObject: typeof isBuiltInObject;
|
252 | declare const util_d_isTypedArray: typeof isTypedArray;
|
253 | declare const util_d_isDom: typeof isDom;
|
254 | declare const util_d_isGradientObject: typeof isGradientObject;
|
255 | declare const util_d_isImagePatternObject: typeof isImagePatternObject;
|
256 | declare const util_d_isRegExp: typeof isRegExp;
|
257 | declare const util_d_eqNaN: typeof eqNaN;
|
258 | declare const util_d_retrieve: typeof retrieve;
|
259 | declare const util_d_retrieve2: typeof retrieve2;
|
260 | declare const util_d_retrieve3: typeof retrieve3;
|
261 | declare const util_d_slice: typeof slice;
|
262 | declare const util_d_normalizeCssArray: typeof normalizeCssArray;
|
263 | declare const util_d_assert: typeof assert;
|
264 | declare const util_d_trim: typeof trim;
|
265 | declare const util_d_setAsPrimitive: typeof setAsPrimitive;
|
266 | declare const util_d_isPrimitive: typeof isPrimitive;
|
267 | type util_d_HashMap<T, KEY extends string | number = string | number> = HashMap<T, KEY>;
|
268 | declare const util_d_HashMap: typeof HashMap;
|
269 | declare const util_d_createHashMap: typeof createHashMap;
|
270 | declare const util_d_concatArray: typeof concatArray;
|
271 | declare const util_d_createObject: typeof createObject;
|
272 | declare const util_d_disableUserSelect: typeof disableUserSelect;
|
273 | declare const util_d_hasOwn: typeof hasOwn;
|
274 | declare const util_d_noop: typeof noop;
|
275 | declare const util_d_RADIAN_TO_DEGREE: typeof RADIAN_TO_DEGREE;
|
276 | declare namespace util_d {
|
277 | export {
|
278 | util_d_curry as curry,
|
279 | util_d_guid as guid,
|
280 | util_d_logError as logError,
|
281 | util_d_clone as clone,
|
282 | util_d_merge as merge,
|
283 | util_d_mergeAll as mergeAll,
|
284 | util_d_extend as extend,
|
285 | util_d_defaults as defaults,
|
286 | util_d_createCanvas as createCanvas,
|
287 | util_d_indexOf as indexOf,
|
288 | util_d_inherits as inherits,
|
289 | util_d_mixin as mixin,
|
290 | util_d_isArrayLike as isArrayLike,
|
291 | util_d_each as each,
|
292 | util_d_map as map,
|
293 | util_d_reduce as reduce,
|
294 | util_d_filter as filter,
|
295 | util_d_find as find,
|
296 | util_d_keys as keys,
|
297 | util_d_Bind1 as Bind1,
|
298 | util_d_Bind2 as Bind2,
|
299 | util_d_Bind3 as Bind3,
|
300 | util_d_Bind4 as Bind4,
|
301 | util_d_Bind5 as Bind5,
|
302 | util_d_bind as bind,
|
303 | util_d_Curry1 as Curry1,
|
304 | util_d_Curry2 as Curry2,
|
305 | util_d_Curry3 as Curry3,
|
306 | util_d_Curry4 as Curry4,
|
307 | util_d_isArray as isArray,
|
308 | util_d_isFunction as isFunction,
|
309 | util_d_isString as isString,
|
310 | util_d_isStringSafe as isStringSafe,
|
311 | util_d_isNumber as isNumber,
|
312 | util_d_isObject as isObject,
|
313 | util_d_isBuiltInObject as isBuiltInObject,
|
314 | util_d_isTypedArray as isTypedArray,
|
315 | util_d_isDom as isDom,
|
316 | util_d_isGradientObject as isGradientObject,
|
317 | util_d_isImagePatternObject as isImagePatternObject,
|
318 | util_d_isRegExp as isRegExp,
|
319 | util_d_eqNaN as eqNaN,
|
320 | util_d_retrieve as retrieve,
|
321 | util_d_retrieve2 as retrieve2,
|
322 | util_d_retrieve3 as retrieve3,
|
323 | util_d_slice as slice,
|
324 | util_d_normalizeCssArray as normalizeCssArray,
|
325 | util_d_assert as assert,
|
326 | util_d_trim as trim,
|
327 | util_d_setAsPrimitive as setAsPrimitive,
|
328 | util_d_isPrimitive as isPrimitive,
|
329 | util_d_HashMap as HashMap,
|
330 | util_d_createHashMap as createHashMap,
|
331 | util_d_concatArray as concatArray,
|
332 | util_d_createObject as createObject,
|
333 | util_d_disableUserSelect as disableUserSelect,
|
334 | util_d_hasOwn as hasOwn,
|
335 | util_d_noop as noop,
|
336 | util_d_RADIAN_TO_DEGREE as RADIAN_TO_DEGREE,
|
337 | };
|
338 | }
|
339 |
|
340 | declare type EventCallbackSingleParam<EvtParam = any> = EvtParam extends any ? (params: EvtParam) => boolean | void : never;
|
341 | declare type EventCallback<EvtParams = any[]> = EvtParams extends any[] ? (...args: EvtParams) => boolean | void : never;
|
342 | declare type EventQuery = string | Object;
|
343 | declare type CbThis<Ctx, Impl> = unknown extends Ctx ? Impl : Ctx;
|
344 | declare type DefaultEventDefinition = Dictionary<EventCallback<any[]>>;
|
345 | interface EventProcessor<EvtDef = DefaultEventDefinition> {
|
346 | normalizeQuery?: (query: EventQuery) => EventQuery;
|
347 | filter?: (eventType: keyof EvtDef, query: EventQuery) => boolean;
|
348 | afterTrigger?: (eventType: keyof EvtDef) => void;
|
349 | }
|
350 | declare class Eventful<EvtDef extends DefaultEventDefinition = DefaultEventDefinition> {
|
351 | private _$handlers;
|
352 | protected _$eventProcessor: EventProcessor<EvtDef>;
|
353 | constructor(eventProcessors?: EventProcessor<EvtDef>);
|
354 | on<Ctx, EvtNm extends keyof EvtDef>(event: EvtNm, handler: WithThisType<EvtDef[EvtNm], CbThis<Ctx, this>>, context?: Ctx): this;
|
355 | on<Ctx, EvtNm extends keyof EvtDef>(event: EvtNm, query: EventQuery, handler: WithThisType<EvtDef[EvtNm], CbThis<Ctx, this>>, context?: Ctx): this;
|
356 | isSilent(eventName: keyof EvtDef): boolean;
|
357 | off(eventType?: keyof EvtDef, handler?: Function): this;
|
358 | trigger<EvtNm extends keyof EvtDef>(eventType: EvtNm, ...args: Parameters<EvtDef[EvtNm]>): this;
|
359 | triggerWithContext(type: keyof EvtDef, ...args: any[]): this;
|
360 | }
|
361 |
|
362 | declare type VectorArray = number[];
|
363 | declare function create(x?: number, y?: number): VectorArray;
|
364 | declare function copy<T extends VectorArray>(out: T, v: VectorArray): T;
|
365 | declare function clone$1(v: VectorArray): VectorArray;
|
366 | declare function set<T extends VectorArray>(out: T, a: number, b: number): T;
|
367 | declare function add<T extends VectorArray>(out: T, v1: VectorArray, v2: VectorArray): T;
|
368 | declare function scaleAndAdd<T extends VectorArray>(out: T, v1: VectorArray, v2: VectorArray, a: number): T;
|
369 | declare function sub<T extends VectorArray>(out: T, v1: VectorArray, v2: VectorArray): T;
|
370 | declare function len(v: VectorArray): number;
|
371 | declare const length: typeof len;
|
372 | declare function lenSquare(v: VectorArray): number;
|
373 | declare const lengthSquare: typeof lenSquare;
|
374 | declare function mul<T extends VectorArray>(out: T, v1: VectorArray, v2: VectorArray): T;
|
375 | declare function div<T extends VectorArray>(out: T, v1: VectorArray, v2: VectorArray): T;
|
376 | declare function dot(v1: VectorArray, v2: VectorArray): number;
|
377 | declare function scale<T extends VectorArray>(out: T, v: VectorArray, s: number): T;
|
378 | declare function normalize<T extends VectorArray>(out: T, v: VectorArray): T;
|
379 | declare function distance(v1: VectorArray, v2: VectorArray): number;
|
380 | declare const dist: typeof distance;
|
381 | declare function distanceSquare(v1: VectorArray, v2: VectorArray): number;
|
382 | declare const distSquare: typeof distanceSquare;
|
383 | declare function negate<T extends VectorArray>(out: T, v: VectorArray): T;
|
384 | declare function lerp<T extends VectorArray>(out: T, v1: VectorArray, v2: VectorArray, t: number): T;
|
385 | declare function applyTransform<T extends VectorArray>(out: T, v: VectorArray, m: MatrixArray): T;
|
386 | declare function min<T extends VectorArray>(out: T, v1: VectorArray, v2: VectorArray): T;
|
387 | declare function max<T extends VectorArray>(out: T, v1: VectorArray, v2: VectorArray): T;
|
388 |
|
389 | type vector_d_VectorArray = VectorArray;
|
390 | declare const vector_d_create: typeof create;
|
391 | declare const vector_d_copy: typeof copy;
|
392 | declare const vector_d_set: typeof set;
|
393 | declare const vector_d_add: typeof add;
|
394 | declare const vector_d_scaleAndAdd: typeof scaleAndAdd;
|
395 | declare const vector_d_sub: typeof sub;
|
396 | declare const vector_d_len: typeof len;
|
397 | declare const vector_d_length: typeof length;
|
398 | declare const vector_d_lenSquare: typeof lenSquare;
|
399 | declare const vector_d_lengthSquare: typeof lengthSquare;
|
400 | declare const vector_d_mul: typeof mul;
|
401 | declare const vector_d_div: typeof div;
|
402 | declare const vector_d_dot: typeof dot;
|
403 | declare const vector_d_scale: typeof scale;
|
404 | declare const vector_d_normalize: typeof normalize;
|
405 | declare const vector_d_distance: typeof distance;
|
406 | declare const vector_d_dist: typeof dist;
|
407 | declare const vector_d_distanceSquare: typeof distanceSquare;
|
408 | declare const vector_d_distSquare: typeof distSquare;
|
409 | declare const vector_d_negate: typeof negate;
|
410 | declare const vector_d_lerp: typeof lerp;
|
411 | declare const vector_d_applyTransform: typeof applyTransform;
|
412 | declare const vector_d_min: typeof min;
|
413 | declare const vector_d_max: typeof max;
|
414 | declare namespace vector_d {
|
415 | export {
|
416 | vector_d_VectorArray as VectorArray,
|
417 | vector_d_create as create,
|
418 | vector_d_copy as copy,
|
419 | clone$1 as clone,
|
420 | vector_d_set as set,
|
421 | vector_d_add as add,
|
422 | vector_d_scaleAndAdd as scaleAndAdd,
|
423 | vector_d_sub as sub,
|
424 | vector_d_len as len,
|
425 | vector_d_length as length,
|
426 | vector_d_lenSquare as lenSquare,
|
427 | vector_d_lengthSquare as lengthSquare,
|
428 | vector_d_mul as mul,
|
429 | vector_d_div as div,
|
430 | vector_d_dot as dot,
|
431 | vector_d_scale as scale,
|
432 | vector_d_normalize as normalize,
|
433 | vector_d_distance as distance,
|
434 | vector_d_dist as dist,
|
435 | vector_d_distanceSquare as distanceSquare,
|
436 | vector_d_distSquare as distSquare,
|
437 | vector_d_negate as negate,
|
438 | vector_d_lerp as lerp,
|
439 | vector_d_applyTransform as applyTransform,
|
440 | vector_d_min as min,
|
441 | vector_d_max as max,
|
442 | };
|
443 | }
|
444 |
|
445 | declare type MatrixArray = number[];
|
446 | declare function create$1(): MatrixArray;
|
447 | declare function identity(out: MatrixArray): MatrixArray;
|
448 | declare function copy$1(out: MatrixArray, m: MatrixArray): MatrixArray;
|
449 | declare function mul$1(out: MatrixArray, m1: MatrixArray, m2: MatrixArray): MatrixArray;
|
450 | declare function translate(out: MatrixArray, a: MatrixArray, v: VectorArray): MatrixArray;
|
451 | declare function rotate(out: MatrixArray, a: MatrixArray, rad: number, pivot?: VectorArray): MatrixArray;
|
452 | declare function scale$1(out: MatrixArray, a: MatrixArray, v: VectorArray): MatrixArray;
|
453 | declare function invert(out: MatrixArray, a: MatrixArray): MatrixArray | null;
|
454 | declare function clone$2(a: MatrixArray): MatrixArray;
|
455 |
|
456 | type matrix_d_MatrixArray = MatrixArray;
|
457 | declare const matrix_d_identity: typeof identity;
|
458 | declare const matrix_d_translate: typeof translate;
|
459 | declare const matrix_d_rotate: typeof rotate;
|
460 | declare const matrix_d_invert: typeof invert;
|
461 | declare namespace matrix_d {
|
462 | export {
|
463 | matrix_d_MatrixArray as MatrixArray,
|
464 | create$1 as create,
|
465 | matrix_d_identity as identity,
|
466 | copy$1 as copy,
|
467 | mul$1 as mul,
|
468 | matrix_d_translate as translate,
|
469 | matrix_d_rotate as rotate,
|
470 | scale$1 as scale,
|
471 | matrix_d_invert as invert,
|
472 | clone$2 as clone,
|
473 | };
|
474 | }
|
475 |
|
476 | interface PointLike {
|
477 | x: number;
|
478 | y: number;
|
479 | }
|
480 | declare class Point {
|
481 | x: number;
|
482 | y: number;
|
483 | constructor(x?: number, y?: number);
|
484 | copy(other: PointLike): this;
|
485 | clone(): Point;
|
486 | set(x: number, y: number): this;
|
487 | equal(other: PointLike): boolean;
|
488 | add(other: PointLike): this;
|
489 | scale(scalar: number): void;
|
490 | scaleAndAdd(other: PointLike, scalar: number): void;
|
491 | sub(other: PointLike): this;
|
492 | dot(other: PointLike): number;
|
493 | len(): number;
|
494 | lenSquare(): number;
|
495 | normalize(): this;
|
496 | distance(other: PointLike): number;
|
497 | distanceSquare(other: Point): number;
|
498 | negate(): this;
|
499 | transform(m: MatrixArray): this;
|
500 | toArray(out: number[]): number[];
|
501 | fromArray(input: number[]): void;
|
502 | static set(p: PointLike, x: number, y: number): void;
|
503 | static copy(p: PointLike, p2: PointLike): void;
|
504 | static len(p: PointLike): number;
|
505 | static lenSquare(p: PointLike): number;
|
506 | static dot(p0: PointLike, p1: PointLike): number;
|
507 | static add(out: PointLike, p0: PointLike, p1: PointLike): void;
|
508 | static sub(out: PointLike, p0: PointLike, p1: PointLike): void;
|
509 | static scale(out: PointLike, p0: PointLike, scalar: number): void;
|
510 | static scaleAndAdd(out: PointLike, p0: PointLike, p1: PointLike, scalar: number): void;
|
511 | static lerp(out: PointLike, p0: PointLike, p1: PointLike, t: number): void;
|
512 | }
|
513 |
|
514 | declare class BoundingRect {
|
515 | x: number;
|
516 | y: number;
|
517 | width: number;
|
518 | height: number;
|
519 | constructor(x: number, y: number, width: number, height: number);
|
520 | union(other: BoundingRect): void;
|
521 | applyTransform(m: MatrixArray): void;
|
522 | calculateTransform(b: RectLike): MatrixArray;
|
523 | intersect(b: RectLike, mtv?: PointLike): boolean;
|
524 | contain(x: number, y: number): boolean;
|
525 | clone(): BoundingRect;
|
526 | copy(other: RectLike): void;
|
527 | plain(): RectLike;
|
528 | isFinite(): boolean;
|
529 | isZero(): boolean;
|
530 | static create(rect: RectLike): BoundingRect;
|
531 | static copy(target: RectLike, source: RectLike): void;
|
532 | static applyTransform(target: RectLike, source: RectLike, m: MatrixArray): void;
|
533 | }
|
534 | declare type RectLike = {
|
535 | x: number;
|
536 | y: number;
|
537 | width: number;
|
538 | height: number;
|
539 | };
|
540 |
|
541 | interface ExtendedCanvasRenderingContext2D extends CanvasRenderingContext2D {
|
542 | dpr?: number;
|
543 | }
|
544 | declare class PathProxy {
|
545 | dpr: number;
|
546 | data: number[] | Float32Array;
|
547 | private _version;
|
548 | private _saveData;
|
549 | private _pendingPtX;
|
550 | private _pendingPtY;
|
551 | private _pendingPtDist;
|
552 | private _ctx;
|
553 | private _xi;
|
554 | private _yi;
|
555 | private _x0;
|
556 | private _y0;
|
557 | private _len;
|
558 | private _pathSegLen;
|
559 | private _pathLen;
|
560 | private _ux;
|
561 | private _uy;
|
562 | static CMD: {
|
563 | M: number;
|
564 | L: number;
|
565 | C: number;
|
566 | Q: number;
|
567 | A: number;
|
568 | Z: number;
|
569 | R: number;
|
570 | };
|
571 | constructor(notSaveData?: boolean);
|
572 | increaseVersion(): void;
|
573 | getVersion(): number;
|
574 | setScale(sx: number, sy: number, segmentIgnoreThreshold?: number): void;
|
575 | setDPR(dpr: number): void;
|
576 | setContext(ctx: ExtendedCanvasRenderingContext2D): void;
|
577 | getContext(): ExtendedCanvasRenderingContext2D;
|
578 | beginPath(): this;
|
579 | reset(): void;
|
580 | moveTo(x: number, y: number): this;
|
581 | lineTo(x: number, y: number): this;
|
582 | bezierCurveTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): this;
|
583 | quadraticCurveTo(x1: number, y1: number, x2: number, y2: number): this;
|
584 | arc(cx: number, cy: number, r: number, startAngle: number, endAngle: number, anticlockwise?: boolean): this;
|
585 | arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): this;
|
586 | rect(x: number, y: number, w: number, h: number): this;
|
587 | closePath(): this;
|
588 | fill(ctx: CanvasRenderingContext2D): void;
|
589 | stroke(ctx: CanvasRenderingContext2D): void;
|
590 | len(): number;
|
591 | setData(data: Float32Array | number[]): void;
|
592 | appendPath(path: PathProxy | PathProxy[]): void;
|
593 | addData(cmd: number, a?: number, b?: number, c?: number, d?: number, e?: number, f?: number, g?: number, h?: number): void;
|
594 | private _drawPendingPt;
|
595 | private _expandData;
|
596 | toStatic(): void;
|
597 | getBoundingRect(): BoundingRect;
|
598 | private _calculateLength;
|
599 | rebuildPath(ctx: PathRebuilder, percent: number): void;
|
600 | clone(): PathProxy;
|
601 | private static initDefaultProps;
|
602 | }
|
603 | interface PathRebuilder {
|
604 | moveTo(x: number, y: number): void;
|
605 | lineTo(x: number, y: number): void;
|
606 | bezierCurveTo(x: number, y: number, x2: number, y2: number, x3: number, y3: number): void;
|
607 | quadraticCurveTo(x: number, y: number, x2: number, y2: number): void;
|
608 | arc(cx: number, cy: number, r: number, startAngle: number, endAngle: number, anticlockwise: boolean): void;
|
609 | ellipse(cx: number, cy: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise: boolean): void;
|
610 | rect(x: number, y: number, width: number, height: number): void;
|
611 | closePath(): void;
|
612 | }
|
613 |
|
614 | declare type easingFunc = (percent: number) => number;
|
615 | declare type AnimationEasing = keyof typeof easingFuncs | easingFunc;
|
616 | declare const easingFuncs: {
|
617 | linear(k: number): number;
|
618 | quadraticIn(k: number): number;
|
619 | quadraticOut(k: number): number;
|
620 | quadraticInOut(k: number): number;
|
621 | cubicIn(k: number): number;
|
622 | cubicOut(k: number): number;
|
623 | cubicInOut(k: number): number;
|
624 | quarticIn(k: number): number;
|
625 | quarticOut(k: number): number;
|
626 | quarticInOut(k: number): number;
|
627 | quinticIn(k: number): number;
|
628 | quinticOut(k: number): number;
|
629 | quinticInOut(k: number): number;
|
630 | sinusoidalIn(k: number): number;
|
631 | sinusoidalOut(k: number): number;
|
632 | sinusoidalInOut(k: number): number;
|
633 | exponentialIn(k: number): number;
|
634 | exponentialOut(k: number): number;
|
635 | exponentialInOut(k: number): number;
|
636 | circularIn(k: number): number;
|
637 | circularOut(k: number): number;
|
638 | circularInOut(k: number): number;
|
639 | elasticIn(k: number): number;
|
640 | elasticOut(k: number): number;
|
641 | elasticInOut(k: number): number;
|
642 | backIn(k: number): number;
|
643 | backOut(k: number): number;
|
644 | backInOut(k: number): number;
|
645 | bounceIn(k: number): number;
|
646 | bounceOut(k: number): number;
|
647 | bounceInOut(k: number): number;
|
648 | };
|
649 |
|
650 | interface Stage {
|
651 | update?: () => void;
|
652 | }
|
653 | interface AnimationOption {
|
654 | stage?: Stage;
|
655 | }
|
656 | declare class Animation extends Eventful {
|
657 | stage: Stage;
|
658 | private _head;
|
659 | private _tail;
|
660 | private _running;
|
661 | private _time;
|
662 | private _pausedTime;
|
663 | private _pauseStart;
|
664 | private _paused;
|
665 | constructor(opts?: AnimationOption);
|
666 | addClip(clip: Clip): void;
|
667 | addAnimator(animator: Animator<any>): void;
|
668 | removeClip(clip: Clip): void;
|
669 | removeAnimator(animator: Animator<any>): void;
|
670 | update(notTriggerFrameAndStageUpdate?: boolean): void;
|
671 | _startLoop(): void;
|
672 | start(): void;
|
673 | stop(): void;
|
674 | pause(): void;
|
675 | resume(): void;
|
676 | clear(): void;
|
677 | isFinished(): boolean;
|
678 | animate<T>(target: T, options: {
|
679 | loop?: boolean;
|
680 | }): Animator<T>;
|
681 | }
|
682 |
|
683 | declare type OnframeCallback = (percent: number) => void;
|
684 | declare type ondestroyCallback = () => void;
|
685 | declare type onrestartCallback = () => void;
|
686 | interface ClipProps {
|
687 | life?: number;
|
688 | delay?: number;
|
689 | loop?: boolean;
|
690 | easing?: AnimationEasing;
|
691 | onframe?: OnframeCallback;
|
692 | ondestroy?: ondestroyCallback;
|
693 | onrestart?: onrestartCallback;
|
694 | }
|
695 | declare class Clip {
|
696 | private _life;
|
697 | private _delay;
|
698 | private _inited;
|
699 | private _startTime;
|
700 | private _pausedTime;
|
701 | private _paused;
|
702 | animation: Animation;
|
703 | loop: boolean;
|
704 | easing: AnimationEasing;
|
705 | easingFunc: (p: number) => number;
|
706 | next: Clip;
|
707 | prev: Clip;
|
708 | onframe: OnframeCallback;
|
709 | ondestroy: ondestroyCallback;
|
710 | onrestart: onrestartCallback;
|
711 | constructor(opts: ClipProps);
|
712 | step(globalTime: number, deltaTime: number): boolean;
|
713 | pause(): void;
|
714 | resume(): void;
|
715 | setEasing(easing: AnimationEasing): void;
|
716 | }
|
717 |
|
718 | declare type ValueType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
719 | declare type Keyframe = {
|
720 | time: number;
|
721 | value: unknown;
|
722 | percent: number;
|
723 | rawValue: unknown;
|
724 | easing?: AnimationEasing;
|
725 | easingFunc?: (percent: number) => number;
|
726 | additiveValue?: unknown;
|
727 | };
|
728 | declare class Track {
|
729 | keyframes: Keyframe[];
|
730 | propName: string;
|
731 | valType: ValueType;
|
732 | discrete: boolean;
|
733 | _invalid: boolean;
|
734 | private _finished;
|
735 | private _needsSort;
|
736 | private _additiveTrack;
|
737 | private _additiveValue;
|
738 | private _lastFr;
|
739 | private _lastFrP;
|
740 | constructor(propName: string);
|
741 | isFinished(): boolean;
|
742 | setFinished(): void;
|
743 | needsAnimate(): boolean;
|
744 | getAdditiveTrack(): Track;
|
745 | addKeyframe(time: number, rawValue: unknown, easing?: AnimationEasing): Keyframe;
|
746 | prepare(maxTime: number, additiveTrack?: Track): void;
|
747 | step(target: any, percent: number): void;
|
748 | private _addToTarget;
|
749 | }
|
750 | declare type DoneCallback = () => void;
|
751 | declare type AbortCallback = () => void;
|
752 | declare type OnframeCallback$1<T> = (target: T, percent: number) => void;
|
753 | declare class Animator<T> {
|
754 | animation?: Animation;
|
755 | targetName?: string;
|
756 | scope?: string;
|
757 | __fromStateTransition?: string;
|
758 | private _tracks;
|
759 | private _trackKeys;
|
760 | private _target;
|
761 | private _loop;
|
762 | private _delay;
|
763 | private _maxTime;
|
764 | private _force;
|
765 | private _paused;
|
766 | private _started;
|
767 | private _allowDiscrete;
|
768 | private _additiveAnimators;
|
769 | private _doneCbs;
|
770 | private _onframeCbs;
|
771 | private _abortedCbs;
|
772 | private _clip;
|
773 | constructor(target: T, loop: boolean, allowDiscreteAnimation?: boolean, additiveTo?: Animator<any>[]);
|
774 | getMaxTime(): number;
|
775 | getDelay(): number;
|
776 | getLoop(): boolean;
|
777 | getTarget(): T;
|
778 | changeTarget(target: T): void;
|
779 | when(time: number, props: Dictionary<any>, easing?: AnimationEasing): this;
|
780 | whenWithKeys(time: number, props: Dictionary<any>, propNames: string[], easing?: AnimationEasing): this;
|
781 | pause(): void;
|
782 | resume(): void;
|
783 | isPaused(): boolean;
|
784 | duration(duration: number): this;
|
785 | private _doneCallback;
|
786 | private _abortedCallback;
|
787 | private _setTracksFinished;
|
788 | private _getAdditiveTrack;
|
789 | start(easing?: AnimationEasing): this;
|
790 | stop(forwardToLast?: boolean): void;
|
791 | delay(time: number): this;
|
792 | during(cb: OnframeCallback$1<T>): this;
|
793 | done(cb: DoneCallback): this;
|
794 | aborted(cb: AbortCallback): this;
|
795 | getClip(): Clip;
|
796 | getTrack(propName: string): Track;
|
797 | getTracks(): Track[];
|
798 | stopTracks(propNames: string[], forwardToLast?: boolean): boolean;
|
799 | saveTo(target: T, trackKeys?: readonly string[], firstOrLast?: boolean): void;
|
800 | __changeFinalValue(finalProps: Dictionary<any>, trackKeys?: readonly string[]): void;
|
801 | }
|
802 |
|
803 | interface PathStyleProps extends CommonStyleProps {
|
804 | fill?: string | PatternObject | LinearGradientObject | RadialGradientObject;
|
805 | stroke?: string | PatternObject | LinearGradientObject | RadialGradientObject;
|
806 | decal?: PatternObject;
|
807 | strokePercent?: number;
|
808 | strokeNoScale?: boolean;
|
809 | fillOpacity?: number;
|
810 | strokeOpacity?: number;
|
811 | lineDash?: false | number[] | 'solid' | 'dashed' | 'dotted';
|
812 | lineDashOffset?: number;
|
813 | lineWidth?: number;
|
814 | lineCap?: CanvasLineCap;
|
815 | lineJoin?: CanvasLineJoin;
|
816 | miterLimit?: number;
|
817 | strokeFirst?: boolean;
|
818 | }
|
819 | interface PathProps extends DisplayableProps {
|
820 | strokeContainThreshold?: number;
|
821 | segmentIgnoreThreshold?: number;
|
822 | subPixelOptimize?: boolean;
|
823 | style?: PathStyleProps;
|
824 | shape?: Dictionary<any>;
|
825 | autoBatch?: boolean;
|
826 | __value?: (string | number)[] | (string | number);
|
827 | buildPath?: (ctx: PathProxy | CanvasRenderingContext2D, shapeCfg: Dictionary<any>, inBatch?: boolean) => void;
|
828 | }
|
829 | declare type PathKey = keyof PathProps;
|
830 | declare type PathPropertyType = PropType<PathProps, PathKey>;
|
831 | declare type PathStatePropNames = DisplayableStatePropNames | 'shape';
|
832 | declare type PathState = Pick<PathProps, PathStatePropNames> & {
|
833 | hoverLayer?: boolean;
|
834 | };
|
835 | interface Path<Props extends PathProps = PathProps> {
|
836 | animate(key?: '', loop?: boolean): Animator<this>;
|
837 | animate(key: 'style', loop?: boolean): Animator<this['style']>;
|
838 | animate(key: 'shape', loop?: boolean): Animator<this['shape']>;
|
839 | getState(stateName: string): PathState;
|
840 | ensureState(stateName: string): PathState;
|
841 | states: Dictionary<PathState>;
|
842 | stateProxy: (stateName: string) => PathState;
|
843 | }
|
844 | declare class Path<Props extends PathProps = PathProps> extends Displayable<Props> {
|
845 | path: PathProxy;
|
846 | strokeContainThreshold: number;
|
847 | segmentIgnoreThreshold: number;
|
848 | subPixelOptimize: boolean;
|
849 | style: PathStyleProps;
|
850 | autoBatch: boolean;
|
851 | private _rectStroke;
|
852 | protected _normalState: PathState;
|
853 | protected _decalEl: Path;
|
854 | shape: Dictionary<any>;
|
855 | constructor(opts?: Props);
|
856 | update(): void;
|
857 | getDecalElement(): Path<PathProps>;
|
858 | protected _init(props?: Props): void;
|
859 | protected getDefaultStyle(): Props['style'];
|
860 | protected getDefaultShape(): {};
|
861 | protected canBeInsideText(): boolean;
|
862 | protected getInsideTextFill(): "#333" | "#ccc" | "#eee";
|
863 | protected getInsideTextStroke(textFill?: string): string;
|
864 | buildPath(ctx: PathProxy | CanvasRenderingContext2D, shapeCfg: Dictionary<any>, inBatch?: boolean): void;
|
865 | pathUpdated(): void;
|
866 | getUpdatedPathProxy(inBatch?: boolean): PathProxy;
|
867 | createPathProxy(): void;
|
868 | hasStroke(): boolean;
|
869 | hasFill(): boolean;
|
870 | getBoundingRect(): BoundingRect;
|
871 | contain(x: number, y: number): boolean;
|
872 | dirtyShape(): void;
|
873 | dirty(): void;
|
874 | animateShape(loop: boolean): Animator<this["shape"]>;
|
875 | updateDuringAnimation(targetKey: string): void;
|
876 | attrKV(key: PathKey, value: PathPropertyType): void;
|
877 | setShape(obj: Props['shape']): this;
|
878 | setShape<T extends keyof Props['shape']>(obj: T, value: Props['shape'][T]): this;
|
879 | shapeChanged(): boolean;
|
880 | createStyle(obj?: Props['style']): Props["style"];
|
881 | protected _innerSaveToNormal(toState: PathState): void;
|
882 | protected _applyStateObj(stateName: string, state: PathState, normalState: PathState, keepCurrentStates: boolean, transition: boolean, animationCfg: ElementAnimateConfig): void;
|
883 | protected _mergeStates(states: PathState[]): PathState;
|
884 | getAnimationStyleProps(): MapToType<PathProps, boolean>;
|
885 | isZeroArea(): boolean;
|
886 | static extend<Shape extends Dictionary<any>>(defaultProps: {
|
887 | type?: string;
|
888 | shape?: Shape;
|
889 | style?: PathStyleProps;
|
890 | beforeBrush?: Displayable['beforeBrush'];
|
891 | afterBrush?: Displayable['afterBrush'];
|
892 | getBoundingRect?: Displayable['getBoundingRect'];
|
893 | calculateTextPosition?: Element['calculateTextPosition'];
|
894 | buildPath(this: Path, ctx: CanvasRenderingContext2D | PathProxy, shape: Shape, inBatch?: boolean): void;
|
895 | init?(this: Path, opts: PathProps): void;
|
896 | }): {
|
897 | new (opts?: PathProps & {
|
898 | shape: Shape;
|
899 | }): Path;
|
900 | };
|
901 | protected static initDefaultProps: void;
|
902 | }
|
903 |
|
904 | declare class Transformable {
|
905 | parent: Transformable;
|
906 | x: number;
|
907 | y: number;
|
908 | scaleX: number;
|
909 | scaleY: number;
|
910 | skewX: number;
|
911 | skewY: number;
|
912 | rotation: number;
|
913 | anchorX: number;
|
914 | anchorY: number;
|
915 | originX: number;
|
916 | originY: number;
|
917 | globalScaleRatio: number;
|
918 | transform: MatrixArray;
|
919 | invTransform: MatrixArray;
|
920 | getLocalTransform(m?: MatrixArray): MatrixArray;
|
921 | setPosition(arr: number[]): void;
|
922 | setScale(arr: number[]): void;
|
923 | setSkew(arr: number[]): void;
|
924 | setOrigin(arr: number[]): void;
|
925 | needLocalTransform(): boolean;
|
926 | updateTransform(): void;
|
927 | private _resolveGlobalScaleRatio;
|
928 | getComputedTransform(): MatrixArray;
|
929 | setLocalTransform(m: VectorArray): void;
|
930 | decomposeTransform(): void;
|
931 | getGlobalScale(out?: VectorArray): VectorArray;
|
932 | transformCoordToLocal(x: number, y: number): number[];
|
933 | transformCoordToGlobal(x: number, y: number): number[];
|
934 | getLineScale(): number;
|
935 | copyTransform(source: Transformable): void;
|
936 | static getLocalTransform(target: Transformable, m?: MatrixArray): MatrixArray;
|
937 | private static initDefaultProps;
|
938 | }
|
939 | declare const TRANSFORMABLE_PROPS: readonly ["x", "y", "originX", "originY", "anchorX", "anchorY", "rotation", "scaleX", "scaleY", "skewX", "skewY"];
|
940 | declare type TransformProp = (typeof TRANSFORMABLE_PROPS)[number];
|
941 |
|
942 | interface TSpanStyleProps extends PathStyleProps {
|
943 | x?: number;
|
944 | y?: number;
|
945 | text?: string;
|
946 | font?: string;
|
947 | fontSize?: number;
|
948 | fontWeight?: FontWeight;
|
949 | fontStyle?: FontStyle;
|
950 | fontFamily?: string;
|
951 | textAlign?: CanvasTextAlign;
|
952 | textBaseline?: CanvasTextBaseline;
|
953 | }
|
954 | interface TSpanProps extends DisplayableProps {
|
955 | style?: TSpanStyleProps;
|
956 | }
|
957 | declare class TSpan extends Displayable<TSpanProps> {
|
958 | style: TSpanStyleProps;
|
959 | hasStroke(): boolean;
|
960 | hasFill(): boolean;
|
961 | createStyle(obj?: TSpanStyleProps): TSpanStyleProps;
|
962 | setBoundingRect(rect: BoundingRect): void;
|
963 | getBoundingRect(): BoundingRect;
|
964 | protected static initDefaultProps: void;
|
965 | }
|
966 |
|
967 | interface ImageStyleProps extends CommonStyleProps {
|
968 | image?: string | ImageLike;
|
969 | x?: number;
|
970 | y?: number;
|
971 | width?: number;
|
972 | height?: number;
|
973 | sx?: number;
|
974 | sy?: number;
|
975 | sWidth?: number;
|
976 | sHeight?: number;
|
977 | }
|
978 | interface ImageProps extends DisplayableProps {
|
979 | style?: ImageStyleProps;
|
980 | onload?: (image: ImageLike) => void;
|
981 | }
|
982 | declare class ZRImage extends Displayable<ImageProps> {
|
983 | style: ImageStyleProps;
|
984 | __image: ImageLike;
|
985 | __imageSrc: string;
|
986 | onload: (image: ImageLike) => void;
|
987 | createStyle(obj?: ImageStyleProps): ImageStyleProps;
|
988 | private _getSize;
|
989 | getWidth(): number;
|
990 | getHeight(): number;
|
991 | getAnimationStyleProps(): MapToType<ImageProps, boolean>;
|
992 | getBoundingRect(): BoundingRect;
|
993 | }
|
994 |
|
995 | declare class RectShape {
|
996 | r?: number | number[];
|
997 | x: number;
|
998 | y: number;
|
999 | width: number;
|
1000 | height: number;
|
1001 | }
|
1002 | interface RectProps extends PathProps {
|
1003 | shape?: Partial<RectShape>;
|
1004 | }
|
1005 | declare class Rect extends Path<RectProps> {
|
1006 | shape: RectShape;
|
1007 | constructor(opts?: RectProps);
|
1008 | getDefaultShape(): RectShape;
|
1009 | buildPath(ctx: CanvasRenderingContext2D, shape: RectShape): void;
|
1010 | isZeroArea(): boolean;
|
1011 | }
|
1012 |
|
1013 | interface GroupProps extends ElementProps {
|
1014 | }
|
1015 | declare class Group extends Element<GroupProps> {
|
1016 | readonly isGroup = true;
|
1017 | private _children;
|
1018 | constructor(opts?: GroupProps);
|
1019 | childrenRef(): Element<ElementProps>[];
|
1020 | children(): Element<ElementProps>[];
|
1021 | childAt(idx: number): Element;
|
1022 | childOfName(name: string): Element;
|
1023 | childCount(): number;
|
1024 | add(child: Element): Group;
|
1025 | addBefore(child: Element, nextSibling: Element): this;
|
1026 | replace(oldChild: Element, newChild: Element): this;
|
1027 | replaceAt(child: Element, index: number): this;
|
1028 | _doAdd(child: Element): void;
|
1029 | remove(child: Element): this;
|
1030 | removeAll(): this;
|
1031 | eachChild<Context>(cb: (this: Context, el: Element, index?: number) => void, context?: Context): this;
|
1032 | traverse<T>(cb: (this: T, el: Element) => boolean | void, context?: T): this;
|
1033 | addSelfToZr(zr: ZRenderType): void;
|
1034 | removeSelfFromZr(zr: ZRenderType): void;
|
1035 | getBoundingRect(includeChildren?: Element[]): BoundingRect;
|
1036 | }
|
1037 | interface GroupLike extends Element {
|
1038 | childrenRef(): Element[];
|
1039 | }
|
1040 |
|
1041 | interface TextStylePropsPart {
|
1042 | text?: string;
|
1043 | fill?: string;
|
1044 | stroke?: string;
|
1045 | strokeNoScale?: boolean;
|
1046 | opacity?: number;
|
1047 | fillOpacity?: number;
|
1048 | strokeOpacity?: number;
|
1049 | lineWidth?: number;
|
1050 | lineDash?: false | number[];
|
1051 | lineDashOffset?: number;
|
1052 | borderDash?: false | number[];
|
1053 | borderDashOffset?: number;
|
1054 | font?: string;
|
1055 | textFont?: string;
|
1056 | fontStyle?: FontStyle;
|
1057 | fontWeight?: FontWeight;
|
1058 | fontFamily?: string;
|
1059 | fontSize?: number | string;
|
1060 | align?: TextAlign;
|
1061 | verticalAlign?: TextVerticalAlign;
|
1062 | lineHeight?: number;
|
1063 | width?: number | string;
|
1064 | height?: number;
|
1065 | tag?: string;
|
1066 | textShadowColor?: string;
|
1067 | textShadowBlur?: number;
|
1068 | textShadowOffsetX?: number;
|
1069 | textShadowOffsetY?: number;
|
1070 | backgroundColor?: string | {
|
1071 | image: ImageLike | string;
|
1072 | };
|
1073 | padding?: number | number[];
|
1074 | margin?: number;
|
1075 | borderColor?: string;
|
1076 | borderWidth?: number;
|
1077 | borderRadius?: number | number[];
|
1078 | shadowColor?: string;
|
1079 | shadowBlur?: number;
|
1080 | shadowOffsetX?: number;
|
1081 | shadowOffsetY?: number;
|
1082 | }
|
1083 | interface TextStyleProps extends TextStylePropsPart {
|
1084 | text?: string;
|
1085 | x?: number;
|
1086 | y?: number;
|
1087 | width?: number;
|
1088 | rich?: Dictionary<TextStylePropsPart>;
|
1089 | overflow?: 'break' | 'breakAll' | 'truncate' | 'none';
|
1090 | lineOverflow?: 'truncate';
|
1091 | ellipsis?: string;
|
1092 | placeholder?: string;
|
1093 | truncateMinChar?: number;
|
1094 | }
|
1095 | interface TextProps extends DisplayableProps {
|
1096 | style?: TextStyleProps;
|
1097 | zlevel?: number;
|
1098 | z?: number;
|
1099 | z2?: number;
|
1100 | culling?: boolean;
|
1101 | cursor?: string;
|
1102 | }
|
1103 | declare type TextState = Pick<TextProps, DisplayableStatePropNames> & ElementCommonState;
|
1104 | declare type DefaultTextStyle = Pick<TextStyleProps, 'fill' | 'stroke' | 'align' | 'verticalAlign'> & {
|
1105 | autoStroke?: boolean;
|
1106 | };
|
1107 | interface ZRText {
|
1108 | animate(key?: '', loop?: boolean): Animator<this>;
|
1109 | animate(key: 'style', loop?: boolean): Animator<this['style']>;
|
1110 | getState(stateName: string): TextState;
|
1111 | ensureState(stateName: string): TextState;
|
1112 | states: Dictionary<TextState>;
|
1113 | stateProxy: (stateName: string) => TextState;
|
1114 | }
|
1115 | declare class ZRText extends Displayable<TextProps> implements GroupLike {
|
1116 | type: string;
|
1117 | style: TextStyleProps;
|
1118 | overlap: 'hidden' | 'show' | 'blur';
|
1119 | innerTransformable: Transformable;
|
1120 | private _children;
|
1121 | private _childCursor;
|
1122 | private _defaultStyle;
|
1123 | constructor(opts?: TextProps);
|
1124 | childrenRef(): (ZRImage | Rect | TSpan)[];
|
1125 | update(): void;
|
1126 | updateTransform(): void;
|
1127 | getLocalTransform(m?: MatrixArray): MatrixArray;
|
1128 | getComputedTransform(): MatrixArray;
|
1129 | private _updateSubTexts;
|
1130 | addSelfToZr(zr: ZRenderType): void;
|
1131 | removeSelfFromZr(zr: ZRenderType): void;
|
1132 | getBoundingRect(): BoundingRect;
|
1133 | setDefaultTextStyle(defaultTextStyle: DefaultTextStyle): void;
|
1134 | setTextContent(textContent: never): void;
|
1135 | protected _mergeStyle(targetStyle: TextStyleProps, sourceStyle: TextStyleProps): TextStyleProps;
|
1136 | private _mergeRich;
|
1137 | getAnimationStyleProps(): MapToType<TextProps, boolean>;
|
1138 | private _getOrCreateChild;
|
1139 | private _updatePlainTexts;
|
1140 | private _updateRichTexts;
|
1141 | private _placeToken;
|
1142 | private _renderBackground;
|
1143 | static makeFont(style: TextStylePropsPart): string;
|
1144 | }
|
1145 |
|
1146 | interface TextPositionCalculationResult {
|
1147 | x: number;
|
1148 | y: number;
|
1149 | align: TextAlign;
|
1150 | verticalAlign: TextVerticalAlign;
|
1151 | }
|
1152 |
|
1153 | declare class PolylineShape {
|
1154 | points: VectorArray[];
|
1155 | percent?: number;
|
1156 | smooth?: number;
|
1157 | smoothConstraint?: VectorArray[];
|
1158 | }
|
1159 | interface PolylineProps extends PathProps {
|
1160 | shape?: Partial<PolylineShape>;
|
1161 | }
|
1162 | declare class Polyline extends Path<PolylineProps> {
|
1163 | shape: PolylineShape;
|
1164 | constructor(opts?: PolylineProps);
|
1165 | getDefaultStyle(): {
|
1166 | stroke: string;
|
1167 | fill: string;
|
1168 | };
|
1169 | getDefaultShape(): PolylineShape;
|
1170 | buildPath(ctx: CanvasRenderingContext2D, shape: PolylineShape): void;
|
1171 | }
|
1172 |
|
1173 | interface ElementAnimateConfig {
|
1174 | duration?: number;
|
1175 | delay?: number;
|
1176 | easing?: AnimationEasing;
|
1177 | during?: (percent: number) => void;
|
1178 | done?: Function;
|
1179 | aborted?: Function;
|
1180 | scope?: string;
|
1181 | force?: boolean;
|
1182 | additive?: boolean;
|
1183 | setToFinal?: boolean;
|
1184 | }
|
1185 | interface ElementTextConfig {
|
1186 | position?: BuiltinTextPosition | (number | string)[];
|
1187 | rotation?: number;
|
1188 | layoutRect?: RectLike;
|
1189 | offset?: number[];
|
1190 | origin?: (number | string)[] | 'center';
|
1191 | distance?: number;
|
1192 | local?: boolean;
|
1193 | insideFill?: string;
|
1194 | insideStroke?: string;
|
1195 | outsideFill?: string;
|
1196 | outsideStroke?: string;
|
1197 | inside?: boolean;
|
1198 | }
|
1199 | interface ElementTextGuideLineConfig {
|
1200 | anchor?: Point;
|
1201 | showAbove?: boolean;
|
1202 | candidates?: ('left' | 'top' | 'right' | 'bottom')[];
|
1203 | }
|
1204 | interface ElementEvent {
|
1205 | type: ElementEventName;
|
1206 | event: ZRRawEvent;
|
1207 | target: Element;
|
1208 | topTarget: Element;
|
1209 | cancelBubble: boolean;
|
1210 | offsetX: number;
|
1211 | offsetY: number;
|
1212 | gestureEvent: string;
|
1213 | pinchX: number;
|
1214 | pinchY: number;
|
1215 | pinchScale: number;
|
1216 | wheelDelta: number;
|
1217 | zrByTouch: boolean;
|
1218 | which: number;
|
1219 | stop: (this: ElementEvent) => void;
|
1220 | }
|
1221 | declare type ElementEventCallback<Ctx, Impl> = (this: CbThis$1<Ctx, Impl>, e: ElementEvent) => boolean | void;
|
1222 | declare type CbThis$1<Ctx, Impl> = unknown extends Ctx ? Impl : Ctx;
|
1223 | interface ElementEventHandlerProps {
|
1224 | onclick: ElementEventCallback<unknown, unknown>;
|
1225 | ondblclick: ElementEventCallback<unknown, unknown>;
|
1226 | onmouseover: ElementEventCallback<unknown, unknown>;
|
1227 | onmouseout: ElementEventCallback<unknown, unknown>;
|
1228 | onmousemove: ElementEventCallback<unknown, unknown>;
|
1229 | onmousewheel: ElementEventCallback<unknown, unknown>;
|
1230 | onmousedown: ElementEventCallback<unknown, unknown>;
|
1231 | onmouseup: ElementEventCallback<unknown, unknown>;
|
1232 | oncontextmenu: ElementEventCallback<unknown, unknown>;
|
1233 | ondrag: ElementEventCallback<unknown, unknown>;
|
1234 | ondragstart: ElementEventCallback<unknown, unknown>;
|
1235 | ondragend: ElementEventCallback<unknown, unknown>;
|
1236 | ondragenter: ElementEventCallback<unknown, unknown>;
|
1237 | ondragleave: ElementEventCallback<unknown, unknown>;
|
1238 | ondragover: ElementEventCallback<unknown, unknown>;
|
1239 | ondrop: ElementEventCallback<unknown, unknown>;
|
1240 | }
|
1241 | interface ElementProps extends Partial<ElementEventHandlerProps>, Partial<Pick<Transformable, TransformProp>> {
|
1242 | name?: string;
|
1243 | ignore?: boolean;
|
1244 | isGroup?: boolean;
|
1245 | draggable?: boolean | 'horizontal' | 'vertical';
|
1246 | silent?: boolean;
|
1247 | ignoreClip?: boolean;
|
1248 | globalScaleRatio?: number;
|
1249 | textConfig?: ElementTextConfig;
|
1250 | textContent?: ZRText;
|
1251 | clipPath?: Path;
|
1252 | drift?: Element['drift'];
|
1253 | extra?: Dictionary<unknown>;
|
1254 | anid?: string;
|
1255 | }
|
1256 | declare const PRIMARY_STATES_KEYS: ["x" | "y" | "originX" | "originY" | "anchorX" | "anchorY" | "rotation" | "scaleX" | "scaleY" | "skewX" | "skewY", "ignore"];
|
1257 | declare type ElementStatePropNames = (typeof PRIMARY_STATES_KEYS)[number] | 'textConfig';
|
1258 | declare type ElementState = Pick<ElementProps, ElementStatePropNames> & ElementCommonState;
|
1259 | declare type ElementCommonState = {
|
1260 | hoverLayer?: boolean;
|
1261 | };
|
1262 | declare type ElementCalculateTextPosition = (out: TextPositionCalculationResult, style: ElementTextConfig, rect: RectLike) => TextPositionCalculationResult;
|
1263 | interface Element<Props extends ElementProps = ElementProps> extends Transformable, Eventful<{
|
1264 | [key in ElementEventName]: (e: ElementEvent) => void | boolean;
|
1265 | } & {
|
1266 | [key in string]: (...args: any) => void | boolean;
|
1267 | }>, ElementEventHandlerProps {
|
1268 | }
|
1269 | declare class Element<Props extends ElementProps = ElementProps> {
|
1270 | id: number;
|
1271 | type: string;
|
1272 | name: string;
|
1273 | ignore: boolean;
|
1274 | silent: boolean;
|
1275 | isGroup: boolean;
|
1276 | draggable: boolean | 'horizontal' | 'vertical';
|
1277 | dragging: boolean;
|
1278 | parent: Group;
|
1279 | animators: Animator<any>[];
|
1280 | ignoreClip: boolean;
|
1281 | __hostTarget: Element;
|
1282 | __zr: ZRenderType;
|
1283 | __dirty: number;
|
1284 | __isRendered: boolean;
|
1285 | __inHover: boolean;
|
1286 | private _clipPath?;
|
1287 | private _textContent?;
|
1288 | private _textGuide?;
|
1289 | textConfig?: ElementTextConfig;
|
1290 | textGuideLineConfig?: ElementTextGuideLineConfig;
|
1291 | anid: string;
|
1292 | extra: Dictionary<unknown>;
|
1293 | currentStates?: string[];
|
1294 | prevStates?: string[];
|
1295 | states: Dictionary<ElementState>;
|
1296 | stateTransition: ElementAnimateConfig;
|
1297 | stateProxy?: (stateName: string, targetStates?: string[]) => ElementState;
|
1298 | protected _normalState: ElementState;
|
1299 | private _innerTextDefaultStyle;
|
1300 | constructor(props?: Props);
|
1301 | protected _init(props?: Props): void;
|
1302 | drift(dx: number, dy: number, e?: ElementEvent): void;
|
1303 | beforeUpdate(): void;
|
1304 | afterUpdate(): void;
|
1305 | update(): void;
|
1306 | updateInnerText(forceUpdate?: boolean): void;
|
1307 | protected canBeInsideText(): boolean;
|
1308 | protected getInsideTextFill(): string | undefined;
|
1309 | protected getInsideTextStroke(textFill: string): string | undefined;
|
1310 | protected getOutsideFill(): string | undefined;
|
1311 | protected getOutsideStroke(textFill: string): string;
|
1312 | traverse<Context>(cb: (this: Context, el: Element<Props>) => void, context?: Context): void;
|
1313 | protected attrKV(key: string, value: unknown): void;
|
1314 | hide(): void;
|
1315 | show(): void;
|
1316 | attr(keyOrObj: Props): this;
|
1317 | attr<T extends keyof Props>(keyOrObj: T, value: Props[T]): this;
|
1318 | saveCurrentToNormalState(toState: ElementState): void;
|
1319 | protected _innerSaveToNormal(toState: ElementState): void;
|
1320 | protected _savePrimaryToNormal(toState: Dictionary<any>, normalState: Dictionary<any>, primaryKeys: readonly string[]): void;
|
1321 | hasState(): boolean;
|
1322 | getState(name: string): ElementState;
|
1323 | ensureState(name: string): ElementState;
|
1324 | clearStates(noAnimation?: boolean): void;
|
1325 | useState(stateName: string, keepCurrentStates?: boolean, noAnimation?: boolean, forceUseHoverLayer?: boolean): ElementState;
|
1326 | useStates(states: string[], noAnimation?: boolean, forceUseHoverLayer?: boolean): void;
|
1327 | isSilent(): boolean;
|
1328 | private _updateAnimationTargets;
|
1329 | removeState(state: string): void;
|
1330 | replaceState(oldState: string, newState: string, forceAdd: boolean): void;
|
1331 | toggleState(state: string, enable: boolean): void;
|
1332 | protected _mergeStates(states: ElementState[]): ElementState;
|
1333 | protected _applyStateObj(stateName: string, state: ElementState, normalState: ElementState, keepCurrentStates: boolean, transition: boolean, animationCfg: ElementAnimateConfig): void;
|
1334 | private _attachComponent;
|
1335 | private _detachComponent;
|
1336 | getClipPath(): Path<PathProps>;
|
1337 | setClipPath(clipPath: Path): void;
|
1338 | removeClipPath(): void;
|
1339 | getTextContent(): ZRText;
|
1340 | setTextContent(textEl: ZRText): void;
|
1341 | setTextConfig(cfg: ElementTextConfig): void;
|
1342 | removeTextConfig(): void;
|
1343 | removeTextContent(): void;
|
1344 | getTextGuideLine(): Polyline;
|
1345 | setTextGuideLine(guideLine: Polyline): void;
|
1346 | removeTextGuideLine(): void;
|
1347 | markRedraw(): void;
|
1348 | dirty(): void;
|
1349 | private _toggleHoverLayerFlag;
|
1350 | addSelfToZr(zr: ZRenderType): void;
|
1351 | removeSelfFromZr(zr: ZRenderType): void;
|
1352 | animate(key?: string, loop?: boolean, allowDiscreteAnimation?: boolean): Animator<any>;
|
1353 | addAnimator(animator: Animator<any>, key: string): void;
|
1354 | updateDuringAnimation(key: string): void;
|
1355 | stopAnimation(scope?: string, forwardToLast?: boolean): this;
|
1356 | animateTo(target: Props, cfg?: ElementAnimateConfig, animationProps?: MapToType<Props, boolean>): void;
|
1357 | animateFrom(target: Props, cfg: ElementAnimateConfig, animationProps?: MapToType<Props, boolean>): void;
|
1358 | protected _transitionState(stateName: string, target: Props, cfg?: ElementAnimateConfig, animationProps?: MapToType<Props, boolean>): void;
|
1359 | getBoundingRect(): BoundingRect;
|
1360 | getPaintRect(): BoundingRect;
|
1361 | calculateTextPosition: ElementCalculateTextPosition;
|
1362 | protected static initDefaultProps: void;
|
1363 | }
|
1364 |
|
1365 | interface CommonStyleProps {
|
1366 | shadowBlur?: number;
|
1367 | shadowOffsetX?: number;
|
1368 | shadowOffsetY?: number;
|
1369 | shadowColor?: string;
|
1370 | opacity?: number;
|
1371 | blend?: string;
|
1372 | }
|
1373 | interface DisplayableProps extends ElementProps {
|
1374 | style?: Dictionary<any>;
|
1375 | zlevel?: number;
|
1376 | z?: number;
|
1377 | z2?: number;
|
1378 | culling?: boolean;
|
1379 | cursor?: string;
|
1380 | rectHover?: boolean;
|
1381 | progressive?: boolean;
|
1382 | incremental?: boolean;
|
1383 | ignoreCoarsePointer?: boolean;
|
1384 | batch?: boolean;
|
1385 | invisible?: boolean;
|
1386 | }
|
1387 | declare type DisplayableKey = keyof DisplayableProps;
|
1388 | declare type DisplayablePropertyType = PropType<DisplayableProps, DisplayableKey>;
|
1389 | declare type DisplayableStatePropNames = ElementStatePropNames | 'style' | 'z' | 'z2' | 'invisible';
|
1390 | declare type DisplayableState = Pick<DisplayableProps, DisplayableStatePropNames> & ElementCommonState;
|
1391 | interface Displayable<Props extends DisplayableProps = DisplayableProps> {
|
1392 | animate(key?: '', loop?: boolean): Animator<this>;
|
1393 | animate(key: 'style', loop?: boolean): Animator<this['style']>;
|
1394 | getState(stateName: string): DisplayableState;
|
1395 | ensureState(stateName: string): DisplayableState;
|
1396 | states: Dictionary<DisplayableState>;
|
1397 | stateProxy: (stateName: string) => DisplayableState;
|
1398 | }
|
1399 | declare class Displayable<Props extends DisplayableProps = DisplayableProps> extends Element<Props> {
|
1400 | invisible: boolean;
|
1401 | z: number;
|
1402 | z2: number;
|
1403 | zlevel: number;
|
1404 | culling: boolean;
|
1405 | cursor: string;
|
1406 | rectHover: boolean;
|
1407 | incremental: boolean;
|
1408 | ignoreCoarsePointer?: boolean;
|
1409 | style: Dictionary<any>;
|
1410 | protected _normalState: DisplayableState;
|
1411 | protected _rect: BoundingRect;
|
1412 | protected _paintRect: BoundingRect;
|
1413 | protected _prevPaintRect: BoundingRect;
|
1414 | dirtyRectTolerance: number;
|
1415 | useHoverLayer?: boolean;
|
1416 | __hoverStyle?: CommonStyleProps;
|
1417 | __clipPaths?: Path[];
|
1418 | __canvasFillGradient: CanvasGradient;
|
1419 | __canvasStrokeGradient: CanvasGradient;
|
1420 | __canvasFillPattern: CanvasPattern;
|
1421 | __canvasStrokePattern: CanvasPattern;
|
1422 | __svgEl: SVGElement;
|
1423 | constructor(props?: Props);
|
1424 | protected _init(props?: Props): void;
|
1425 | beforeBrush(): void;
|
1426 | afterBrush(): void;
|
1427 | innerBeforeBrush(): void;
|
1428 | innerAfterBrush(): void;
|
1429 | shouldBePainted(viewWidth: number, viewHeight: number, considerClipPath: boolean, considerAncestors: boolean): boolean;
|
1430 | contain(x: number, y: number): boolean;
|
1431 | traverse<Context>(cb: (this: Context, el: this) => void, context?: Context): void;
|
1432 | rectContain(x: number, y: number): boolean;
|
1433 | getPaintRect(): BoundingRect;
|
1434 | setPrevPaintRect(paintRect: BoundingRect): void;
|
1435 | getPrevPaintRect(): BoundingRect;
|
1436 | animateStyle(loop: boolean): Animator<this["style"]>;
|
1437 | updateDuringAnimation(targetKey: string): void;
|
1438 | attrKV(key: DisplayableKey, value: DisplayablePropertyType): void;
|
1439 | setStyle(obj: Props['style']): this;
|
1440 | setStyle<T extends keyof Props['style']>(obj: T, value: Props['style'][T]): this;
|
1441 | dirtyStyle(notRedraw?: boolean): void;
|
1442 | dirty(): void;
|
1443 | styleChanged(): boolean;
|
1444 | styleUpdated(): void;
|
1445 | createStyle(obj?: Props['style']): Props["style"];
|
1446 | useStyle(obj: Props['style']): void;
|
1447 | isStyleObject(obj: Props['style']): any;
|
1448 | protected _innerSaveToNormal(toState: DisplayableState): void;
|
1449 | protected _applyStateObj(stateName: string, state: DisplayableState, normalState: DisplayableState, keepCurrentStates: boolean, transition: boolean, animationCfg: ElementAnimateConfig): void;
|
1450 | protected _mergeStates(states: DisplayableState[]): DisplayableState;
|
1451 | protected _mergeStyle(targetStyle: CommonStyleProps, sourceStyle: CommonStyleProps): CommonStyleProps;
|
1452 | getAnimationStyleProps(): MapToType<DisplayableProps, boolean>;
|
1453 | protected static initDefaultProps: void;
|
1454 | }
|
1455 |
|
1456 | interface PainterBase {
|
1457 | type: string;
|
1458 | root?: HTMLElement;
|
1459 | ssrOnly?: boolean;
|
1460 | resize(width?: number | string, height?: number | string): void;
|
1461 | refresh(): void;
|
1462 | clear(): void;
|
1463 | renderToString?(): string;
|
1464 | getType: () => string;
|
1465 | getWidth(): number;
|
1466 | getHeight(): number;
|
1467 | dispose(): void;
|
1468 | getViewportRoot: () => HTMLElement;
|
1469 | getViewportRootOffset: () => {
|
1470 | offsetLeft: number;
|
1471 | offsetTop: number;
|
1472 | };
|
1473 | refreshHover(): void;
|
1474 | configLayer(zlevel: number, config: Dictionary<any>): void;
|
1475 | setBackgroundColor(backgroundColor: string | GradientObject | PatternObject): void;
|
1476 | }
|
1477 |
|
1478 | interface HandlerProxyInterface extends Eventful {
|
1479 | handler: Handler;
|
1480 | dispose: () => void;
|
1481 | setCursor: (cursorStyle?: string) => void;
|
1482 | }
|
1483 |
|
1484 | declare function shapeCompareFunc(a: Displayable, b: Displayable): number;
|
1485 | declare class Storage {
|
1486 | private _roots;
|
1487 | private _displayList;
|
1488 | private _displayListLen;
|
1489 | traverse<T>(cb: (this: T, el: Element) => void, context?: T): void;
|
1490 | getDisplayList(update?: boolean, includeIgnore?: boolean): Displayable[];
|
1491 | updateDisplayList(includeIgnore?: boolean): void;
|
1492 | private _updateAndAddDisplayable;
|
1493 | addRoot(el: Element): void;
|
1494 | delRoot(el: Element | Element[]): void;
|
1495 | delAllRoots(): void;
|
1496 | getRoots(): Element<ElementProps>[];
|
1497 | dispose(): void;
|
1498 | displayableSortFunc: typeof shapeCompareFunc;
|
1499 | }
|
1500 |
|
1501 | declare class HoveredResult {
|
1502 | x: number;
|
1503 | y: number;
|
1504 | target: Displayable;
|
1505 | topTarget: Displayable;
|
1506 | constructor(x?: number, y?: number);
|
1507 | }
|
1508 | declare type HandlerName = 'click' | 'dblclick' | 'mousewheel' | 'mouseout' | 'mouseup' | 'mousedown' | 'mousemove' | 'contextmenu';
|
1509 | declare class Handler extends Eventful {
|
1510 | storage: Storage;
|
1511 | painter: PainterBase;
|
1512 | painterRoot: HTMLElement;
|
1513 | proxy: HandlerProxyInterface;
|
1514 | private _hovered;
|
1515 | private _gestureMgr;
|
1516 | private _draggingMgr;
|
1517 | private _pointerSize;
|
1518 | _downEl: Element;
|
1519 | _upEl: Element;
|
1520 | _downPoint: [number, number];
|
1521 | constructor(storage: Storage, painter: PainterBase, proxy: HandlerProxyInterface, painterRoot: HTMLElement, pointerSize: number);
|
1522 | setHandlerProxy(proxy: HandlerProxyInterface): void;
|
1523 | mousemove(event: ZRRawEvent): void;
|
1524 | mouseout(event: ZRRawEvent): void;
|
1525 | resize(): void;
|
1526 | dispatch(eventName: HandlerName, eventArgs?: any): void;
|
1527 | dispose(): void;
|
1528 | setCursorStyle(cursorStyle: string): void;
|
1529 | dispatchToElement(targetInfo: {
|
1530 | target?: Element;
|
1531 | topTarget?: Element;
|
1532 | }, eventName: ElementEventName, event: ZRRawEvent): void;
|
1533 | findHover(x: number, y: number, exclude?: Displayable): HoveredResult;
|
1534 | processGesture(event: ZRRawEvent, stage?: 'start' | 'end' | 'change'): void;
|
1535 | click: (event: ZRRawEvent) => void;
|
1536 | mousedown: (event: ZRRawEvent) => void;
|
1537 | mouseup: (event: ZRRawEvent) => void;
|
1538 | mousewheel: (event: ZRRawEvent) => void;
|
1539 | dblclick: (event: ZRRawEvent) => void;
|
1540 | contextmenu: (event: ZRRawEvent) => void;
|
1541 | }
|
1542 |
|
1543 | interface LayerConfig {
|
1544 | clearColor?: string | GradientObject | ImagePatternObject;
|
1545 | motionBlur?: boolean;
|
1546 | lastFrameAlpha?: number;
|
1547 | }
|
1548 |
|
1549 |
|
1550 |
|
1551 |
|
1552 |
|
1553 |
|
1554 |
|
1555 |
|
1556 |
|
1557 |
|
1558 |
|
1559 | declare type PainterBaseCtor = {
|
1560 | new (dom: HTMLElement, storage: Storage, ...args: any[]): PainterBase;
|
1561 | };
|
1562 | declare class ZRender {
|
1563 | dom?: HTMLElement;
|
1564 | id: number;
|
1565 | storage: Storage;
|
1566 | painter: PainterBase;
|
1567 | handler: Handler;
|
1568 | animation: Animation;
|
1569 | private _sleepAfterStill;
|
1570 | private _stillFrameAccum;
|
1571 | private _needsRefresh;
|
1572 | private _needsRefreshHover;
|
1573 | private _disposed;
|
1574 | private _darkMode;
|
1575 | private _backgroundColor;
|
1576 | constructor(id: number, dom?: HTMLElement, opts?: ZRenderInitOpt);
|
1577 | add(el: Element): void;
|
1578 | remove(el: Element): void;
|
1579 | configLayer(zLevel: number, config: LayerConfig): void;
|
1580 | setBackgroundColor(backgroundColor: string | GradientObject | PatternObject): void;
|
1581 | getBackgroundColor(): string | GradientObject | PatternObject;
|
1582 | setDarkMode(darkMode: boolean): void;
|
1583 | isDarkMode(): boolean;
|
1584 | refreshImmediately(fromInside?: boolean): void;
|
1585 | refresh(): void;
|
1586 | flush(): void;
|
1587 | private _flush;
|
1588 | setSleepAfterStill(stillFramesCount: number): void;
|
1589 | wakeUp(): void;
|
1590 | refreshHover(): void;
|
1591 | refreshHoverImmediately(): void;
|
1592 | resize(opts?: {
|
1593 | width?: number | string;
|
1594 | height?: number | string;
|
1595 | }): void;
|
1596 | clearAnimation(): void;
|
1597 | getWidth(): number | undefined;
|
1598 | getHeight(): number | undefined;
|
1599 | setCursorStyle(cursorStyle: string): void;
|
1600 | findHover(x: number, y: number): {
|
1601 | target: Displayable;
|
1602 | topTarget: Displayable;
|
1603 | } | undefined;
|
1604 | on<Ctx>(eventName: ElementEventName, eventHandler: ElementEventCallback<Ctx, ZRenderType>, context?: Ctx): this;
|
1605 | on<Ctx>(eventName: string, eventHandler: WithThisType<EventCallback<any[]>, unknown extends Ctx ? ZRenderType : Ctx>, context?: Ctx): this;
|
1606 | off(eventName?: string, eventHandler?: EventCallback): void;
|
1607 | trigger(eventName: string, event?: unknown): void;
|
1608 | clear(): void;
|
1609 | dispose(): void;
|
1610 | }
|
1611 | interface ZRenderInitOpt {
|
1612 | renderer?: string;
|
1613 | devicePixelRatio?: number;
|
1614 | width?: number | string;
|
1615 | height?: number | string;
|
1616 | useDirtyRect?: boolean;
|
1617 | useCoarsePointer?: 'auto' | boolean;
|
1618 | pointerSize?: number;
|
1619 | ssr?: boolean;
|
1620 | }
|
1621 | declare function init(dom?: HTMLElement | null, opts?: ZRenderInitOpt): ZRender;
|
1622 | declare function dispose(zr: ZRender): void;
|
1623 | declare function disposeAll(): void;
|
1624 | declare function getInstance(id: number): ZRender;
|
1625 | declare function registerPainter(name: string, Ctor: PainterBaseCtor): void;
|
1626 | declare type ElementSSRData = HashMap<unknown>;
|
1627 | declare type ElementSSRDataGetter<T> = (el: Element) => HashMap<T>;
|
1628 | declare function getElementSSRData(el: Element): ElementSSRData;
|
1629 | declare function registerSSRDataGetter<T>(getter: ElementSSRDataGetter<T>): void;
|
1630 | declare const version = "5.6.0";
|
1631 | interface ZRenderType extends ZRender {
|
1632 | }
|
1633 |
|
1634 | type zrender_d_ZRenderInitOpt = ZRenderInitOpt;
|
1635 | declare const zrender_d_init: typeof init;
|
1636 | declare const zrender_d_dispose: typeof dispose;
|
1637 | declare const zrender_d_disposeAll: typeof disposeAll;
|
1638 | declare const zrender_d_getInstance: typeof getInstance;
|
1639 | declare const zrender_d_registerPainter: typeof registerPainter;
|
1640 | type zrender_d_ElementSSRData = ElementSSRData;
|
1641 | type zrender_d_ElementSSRDataGetter<T> = ElementSSRDataGetter<T>;
|
1642 | declare const zrender_d_getElementSSRData: typeof getElementSSRData;
|
1643 | declare const zrender_d_registerSSRDataGetter: typeof registerSSRDataGetter;
|
1644 | declare const zrender_d_version: typeof version;
|
1645 | type zrender_d_ZRenderType = ZRenderType;
|
1646 | declare namespace zrender_d {
|
1647 | export {
|
1648 | zrender_d_ZRenderInitOpt as ZRenderInitOpt,
|
1649 | zrender_d_init as init,
|
1650 | zrender_d_dispose as dispose,
|
1651 | zrender_d_disposeAll as disposeAll,
|
1652 | zrender_d_getInstance as getInstance,
|
1653 | zrender_d_registerPainter as registerPainter,
|
1654 | zrender_d_ElementSSRData as ElementSSRData,
|
1655 | zrender_d_ElementSSRDataGetter as ElementSSRDataGetter,
|
1656 | zrender_d_getElementSSRData as getElementSSRData,
|
1657 | zrender_d_registerSSRDataGetter as registerSSRDataGetter,
|
1658 | zrender_d_version as version,
|
1659 | zrender_d_ZRenderType as ZRenderType,
|
1660 | };
|
1661 | }
|
1662 |
|
1663 | declare function encodeHTML(source: string): string;
|
1664 |
|
1665 | interface InnerTruncateOption {
|
1666 | maxIteration?: number;
|
1667 | minChar?: number;
|
1668 | placeholder?: string;
|
1669 | maxIterations?: number;
|
1670 | }
|
1671 | declare function truncateText(text: string, containerWidth: number, font: string, ellipsis?: string, options?: InnerTruncateOption): string;
|
1672 |
|
1673 | declare type SVGPathOption = Omit<PathProps, 'shape' | 'buildPath'>;
|
1674 | declare class SVGPath extends Path {
|
1675 | applyTransform(m: MatrixArray): void;
|
1676 | }
|
1677 | declare function extendFromString(str: string, defaultOpts?: SVGPathOption): typeof SVGPath;
|
1678 | declare function mergePath(pathEls: Path[], opts: PathProps): Path<PathProps>;
|
1679 |
|
1680 | declare class CircleShape {
|
1681 | cx: number;
|
1682 | cy: number;
|
1683 | r: number;
|
1684 | }
|
1685 | interface CircleProps extends PathProps {
|
1686 | shape?: Partial<CircleShape>;
|
1687 | }
|
1688 | declare class Circle extends Path<CircleProps> {
|
1689 | shape: CircleShape;
|
1690 | constructor(opts?: CircleProps);
|
1691 | getDefaultShape(): CircleShape;
|
1692 | buildPath(ctx: CanvasRenderingContext2D, shape: CircleShape): void;
|
1693 | }
|
1694 |
|
1695 | declare class EllipseShape {
|
1696 | cx: number;
|
1697 | cy: number;
|
1698 | rx: number;
|
1699 | ry: number;
|
1700 | }
|
1701 | interface EllipseProps extends PathProps {
|
1702 | shape?: Partial<EllipseShape>;
|
1703 | }
|
1704 | declare class Ellipse extends Path<EllipseProps> {
|
1705 | shape: EllipseShape;
|
1706 | constructor(opts?: EllipseProps);
|
1707 | getDefaultShape(): EllipseShape;
|
1708 | buildPath(ctx: CanvasRenderingContext2D, shape: EllipseShape): void;
|
1709 | }
|
1710 |
|
1711 | declare class SectorShape {
|
1712 | cx: number;
|
1713 | cy: number;
|
1714 | r0: number;
|
1715 | r: number;
|
1716 | startAngle: number;
|
1717 | endAngle: number;
|
1718 | clockwise: boolean;
|
1719 | cornerRadius: number | number[];
|
1720 | }
|
1721 | interface SectorProps extends PathProps {
|
1722 | shape?: Partial<SectorShape>;
|
1723 | }
|
1724 | declare class Sector extends Path<SectorProps> {
|
1725 | shape: SectorShape;
|
1726 | constructor(opts?: SectorProps);
|
1727 | getDefaultShape(): SectorShape;
|
1728 | buildPath(ctx: CanvasRenderingContext2D, shape: SectorShape): void;
|
1729 | isZeroArea(): boolean;
|
1730 | }
|
1731 |
|
1732 | declare class RingShape {
|
1733 | cx: number;
|
1734 | cy: number;
|
1735 | r: number;
|
1736 | r0: number;
|
1737 | }
|
1738 | interface RingProps extends PathProps {
|
1739 | shape?: Partial<RingShape>;
|
1740 | }
|
1741 | declare class Ring extends Path<RingProps> {
|
1742 | shape: RingShape;
|
1743 | constructor(opts?: RingProps);
|
1744 | getDefaultShape(): RingShape;
|
1745 | buildPath(ctx: CanvasRenderingContext2D, shape: RingShape): void;
|
1746 | }
|
1747 |
|
1748 | declare class PolygonShape {
|
1749 | points: VectorArray[];
|
1750 | smooth?: number;
|
1751 | smoothConstraint?: VectorArray[];
|
1752 | }
|
1753 | interface PolygonProps extends PathProps {
|
1754 | shape?: Partial<PolygonShape>;
|
1755 | }
|
1756 | declare class Polygon extends Path<PolygonProps> {
|
1757 | shape: PolygonShape;
|
1758 | constructor(opts?: PolygonProps);
|
1759 | getDefaultShape(): PolygonShape;
|
1760 | buildPath(ctx: CanvasRenderingContext2D, shape: PolygonShape): void;
|
1761 | }
|
1762 |
|
1763 | declare class LineShape {
|
1764 | x1: number;
|
1765 | y1: number;
|
1766 | x2: number;
|
1767 | y2: number;
|
1768 | percent: number;
|
1769 | }
|
1770 | interface LineProps extends PathProps {
|
1771 | shape?: Partial<LineShape>;
|
1772 | }
|
1773 | declare class Line extends Path<LineProps> {
|
1774 | shape: LineShape;
|
1775 | constructor(opts?: LineProps);
|
1776 | getDefaultStyle(): {
|
1777 | stroke: string;
|
1778 | fill: string;
|
1779 | };
|
1780 | getDefaultShape(): LineShape;
|
1781 | buildPath(ctx: CanvasRenderingContext2D, shape: LineShape): void;
|
1782 | pointAt(p: number): VectorArray;
|
1783 | }
|
1784 |
|
1785 | declare class BezierCurveShape {
|
1786 | x1: number;
|
1787 | y1: number;
|
1788 | x2: number;
|
1789 | y2: number;
|
1790 | cpx1: number;
|
1791 | cpy1: number;
|
1792 | cpx2?: number;
|
1793 | cpy2?: number;
|
1794 | percent: number;
|
1795 | }
|
1796 | interface BezierCurveProps extends PathProps {
|
1797 | shape?: Partial<BezierCurveShape>;
|
1798 | }
|
1799 | declare class BezierCurve extends Path<BezierCurveProps> {
|
1800 | shape: BezierCurveShape;
|
1801 | constructor(opts?: BezierCurveProps);
|
1802 | getDefaultStyle(): {
|
1803 | stroke: string;
|
1804 | fill: string;
|
1805 | };
|
1806 | getDefaultShape(): BezierCurveShape;
|
1807 | buildPath(ctx: CanvasRenderingContext2D, shape: BezierCurveShape): void;
|
1808 | pointAt(t: number): number[];
|
1809 | tangentAt(t: number): number[];
|
1810 | }
|
1811 |
|
1812 | declare class ArcShape {
|
1813 | cx: number;
|
1814 | cy: number;
|
1815 | r: number;
|
1816 | startAngle: number;
|
1817 | endAngle: number;
|
1818 | clockwise?: boolean;
|
1819 | }
|
1820 | interface ArcProps extends PathProps {
|
1821 | shape?: Partial<ArcShape>;
|
1822 | }
|
1823 | declare class Arc extends Path<ArcProps> {
|
1824 | shape: ArcShape;
|
1825 | constructor(opts?: ArcProps);
|
1826 | getDefaultStyle(): {
|
1827 | stroke: string;
|
1828 | fill: string;
|
1829 | };
|
1830 | getDefaultShape(): ArcShape;
|
1831 | buildPath(ctx: CanvasRenderingContext2D, shape: ArcShape): void;
|
1832 | }
|
1833 |
|
1834 | interface CompoundPathShape {
|
1835 | paths: Path[];
|
1836 | }
|
1837 | declare class CompoundPath extends Path {
|
1838 | type: string;
|
1839 | shape: CompoundPathShape;
|
1840 | private _updatePathDirty;
|
1841 | beforeBrush(): void;
|
1842 | buildPath(ctx: PathProxy | CanvasRenderingContext2D, shape: CompoundPathShape): void;
|
1843 | afterBrush(): void;
|
1844 | getBoundingRect(): BoundingRect;
|
1845 | }
|
1846 |
|
1847 | declare class IncrementalDisplayable extends Displayable {
|
1848 | notClear: boolean;
|
1849 | incremental: boolean;
|
1850 | private _displayables;
|
1851 | private _temporaryDisplayables;
|
1852 | private _cursor;
|
1853 | traverse<T>(cb: (this: T, el: this) => void, context: T): void;
|
1854 | useStyle(): void;
|
1855 | getCursor(): number;
|
1856 | innerAfterBrush(): void;
|
1857 | clearDisplaybles(): void;
|
1858 | clearTemporalDisplayables(): void;
|
1859 | addDisplayable(displayable: Displayable, notPersistent?: boolean): void;
|
1860 | addDisplayables(displayables: Displayable[], notPersistent?: boolean): void;
|
1861 | getDisplayables(): Displayable[];
|
1862 | getTemporalDisplayables(): Displayable[];
|
1863 | eachPendingDisplayable(cb: (displayable: Displayable) => void): void;
|
1864 | update(): void;
|
1865 | getBoundingRect(): BoundingRect;
|
1866 | contain(x: number, y: number): boolean;
|
1867 | }
|
1868 |
|
1869 | declare type Constructor = new (...args: any) => any;
|
1870 | interface ClassManager {
|
1871 | registerClass: (clz: Constructor) => Constructor;
|
1872 | getClass: (componentMainType: ComponentMainType, subType?: ComponentSubType, throwWhenNotFound?: boolean) => Constructor;
|
1873 | getClassesByMainType: (componentType: ComponentMainType) => Constructor[];
|
1874 | hasClass: (componentType: ComponentFullType) => boolean;
|
1875 | getAllClassMainTypes: () => ComponentMainType[];
|
1876 | hasSubTypes: (componentType: ComponentFullType) => boolean;
|
1877 | }
|
1878 |
|
1879 | interface SubTypeDefaulter {
|
1880 | (option: ComponentOption): ComponentSubType;
|
1881 | }
|
1882 | interface SubTypeDefaulterManager {
|
1883 | registerSubTypeDefaulter: (componentType: string, defaulter: SubTypeDefaulter) => void;
|
1884 | determineSubType: (componentType: string, option: ComponentOption) => string;
|
1885 | }
|
1886 |
|
1887 | declare type DiffKeyGetter<CTX = unknown> = (this: DataDiffer<CTX>, value: unknown, index: number) => string;
|
1888 | declare type DiffCallbackAdd = (newIndex: number) => void;
|
1889 | declare type DiffCallbackUpdate = (newIndex: number, oldIndex: number) => void;
|
1890 | declare type DiffCallbackRemove = (oldIndex: number) => void;
|
1891 | declare type DiffCallbackUpdateManyToOne = (newIndex: number, oldIndex: number[]) => void;
|
1892 | declare type DiffCallbackUpdateOneToMany = (newIndex: number[], oldIndex: number) => void;
|
1893 | declare type DiffCallbackUpdateManyToMany = (newIndex: number[], oldIndex: number[]) => void;
|
1894 | declare type DataDiffMode = 'oneToOne' | 'multiple';
|
1895 | declare class DataDiffer<CTX = unknown> {
|
1896 | private _old;
|
1897 | private _new;
|
1898 | private _oldKeyGetter;
|
1899 | private _newKeyGetter;
|
1900 | private _add;
|
1901 | private _update;
|
1902 | private _updateManyToOne;
|
1903 | private _updateOneToMany;
|
1904 | private _updateManyToMany;
|
1905 | private _remove;
|
1906 | private _diffModeMultiple;
|
1907 | readonly context: CTX;
|
1908 | |
1909 |
|
1910 |
|
1911 | constructor(oldArr: ArrayLike$1<unknown>, newArr: ArrayLike$1<unknown>, oldKeyGetter?: DiffKeyGetter<CTX>, newKeyGetter?: DiffKeyGetter<CTX>, context?: CTX, diffMode?: DataDiffMode);
|
1912 | /**
|
1913 | * Callback function when add a data
|
1914 | */
|
1915 | add(func: DiffCallbackAdd): this;
|
1916 | /**
|
1917 | * Callback function when update a data
|
1918 | */
|
1919 | update(func: DiffCallbackUpdate): this;
|
1920 | /**
|
1921 | * Callback function when update a data and only work in `cbMode: 'byKey'`.
|
1922 | */
|
1923 | updateManyToOne(func: DiffCallbackUpdateManyToOne): this;
|
1924 | /**
|
1925 | * Callback function when update a data and only work in `cbMode: 'byKey'`.
|
1926 | */
|
1927 | updateOneToMany(func: DiffCallbackUpdateOneToMany): this;
|
1928 | /**
|
1929 | * Callback function when update a data and only work in `cbMode: 'byKey'`.
|
1930 | */
|
1931 | updateManyToMany(func: DiffCallbackUpdateManyToMany): this;
|
1932 | /**
|
1933 | * Callback function when remove a data
|
1934 | */
|
1935 | remove(func: DiffCallbackRemove): this;
|
1936 | execute(): void;
|
1937 | private _executeOneToOne;
|
1938 | /**
|
1939 | * For example, consider the case:
|
1940 | * oldData: [o0, o1, o2, o3, o4, o5, o6, o7],
|
1941 | * newData: [n0, n1, n2, n3, n4, n5, n6, n7, n8],
|
1942 | * Where:
|
1943 | * o0, o1, n0 has key 'a' (many to one)
|
1944 | * o5, n4, n5, n6 has key 'b' (one to many)
|
1945 | * o2, n1 has key 'c' (one to one)
|
1946 | * n2, n3 has key 'd' (add)
|
1947 | * o3, o4 has key 'e' (remove)
|
1948 | * o6, o7, n7, n8 has key 'f' (many to many, treated as add and remove)
|
1949 | * Then:
|
1950 | * (The order of the following directives are not ensured.)
|
1951 | * this._updateManyToOne(n0, [o0, o1]);
|
1952 | * this._updateOneToMany([n4, n5, n6], o5);
|
1953 | * this._update(n1, o2);
|
1954 | * this._remove(o3);
|
1955 | * this._remove(o4);
|
1956 | * this._remove(o6);
|
1957 | * this._remove(o7);
|
1958 | * this._add(n2);
|
1959 | * this._add(n3);
|
1960 | * this._add(n7);
|
1961 | * this._add(n8);
|
1962 | */
|
1963 | private _executeMultiple;
|
1964 | private _performRestAdd;
|
1965 | private _initIndexMap;
|
1966 | }
|
1967 |
|
1968 | declare type PipedDataTransformOption = DataTransformOption[];
|
1969 | declare type DataTransformType = string;
|
1970 | declare type DataTransformConfig = unknown;
|
1971 | interface DataTransformOption {
|
1972 | type: DataTransformType;
|
1973 | config?: DataTransformConfig;
|
1974 | print?: boolean;
|
1975 | }
|
1976 | interface ExternalDataTransform<TO extends DataTransformOption = DataTransformOption> {
|
1977 | type: string;
|
1978 | __isBuiltIn?: boolean;
|
1979 | transform: (param: ExternalDataTransformParam<TO>) => ExternalDataTransformResultItem | ExternalDataTransformResultItem[];
|
1980 | }
|
1981 | interface ExternalDataTransformParam<TO extends DataTransformOption = DataTransformOption> {
|
1982 | upstream: ExternalSource;
|
1983 | upstreamList: ExternalSource[];
|
1984 | config: TO['config'];
|
1985 | }
|
1986 | interface ExternalDataTransformResultItem {
|
1987 | |
1988 |
|
1989 |
|
1990 | data: OptionSourceDataArrayRows | OptionSourceDataObjectRows;
|
1991 | |
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 |
|
1999 |
|
2000 | dimensions?: DimensionDefinitionLoose[];
|
2001 | }
|
2002 | declare type DataTransformDataItem = ExternalDataTransformResultItem['data'][number];
|
2003 | interface ExternalDimensionDefinition extends Partial<DimensionDefinition> {
|
2004 | index: DimensionIndex;
|
2005 | }
|
2006 |
|
2007 |
|
2008 |
|
2009 |
|
2010 | declare class ExternalSource {
|
2011 | |
2012 |
|
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 |
|
2018 |
|
2019 |
|
2020 | sourceFormat: SourceFormat;
|
2021 | getRawData(): Source['data'];
|
2022 | getRawDataItem(dataIndex: number): DataTransformDataItem;
|
2023 | cloneRawData(): Source['data'];
|
2024 | |
2025 |
|
2026 |
|
2027 | getDimensionInfo(dim: DimensionLoose): ExternalDimensionDefinition;
|
2028 | |
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 |
|
2035 |
|
2036 |
|
2037 | cloneAllDimensionInfo(): ExternalDimensionDefinition[];
|
2038 | count(): number;
|
2039 | |
2040 |
|
2041 |
|
2042 |
|
2043 |
|
2044 | retrieveValue(dataIndex: number, dimIndex: DimensionIndex): OptionDataValue;
|
2045 | retrieveValueFromItem(dataItem: DataTransformDataItem, dimIndex: DimensionIndex): OptionDataValue;
|
2046 | convertValue(rawVal: unknown, dimInfo: ExternalDimensionDefinition): ParsedValue;
|
2047 | }
|
2048 | declare function registerExternalTransform(externalTransform: ExternalDataTransform): void;
|
2049 |
|
2050 | interface PaletteMixin<T extends PaletteOptionMixin = PaletteOptionMixin> extends Pick<Model<T>, 'get'> {
|
2051 | }
|
2052 | declare class PaletteMixin<T extends PaletteOptionMixin = PaletteOptionMixin> {
|
2053 | getColorFromPalette(this: PaletteMixin<T>, name: string, scope?: any, requestNum?: number): ZRColor;
|
2054 | clearColorPalette(this: PaletteMixin<T>): void;
|
2055 | }
|
2056 |
|
2057 | interface ComponentView {
|
2058 | |
2059 |
|
2060 |
|
2061 | updateTransform?(model: ComponentModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void | {
|
2062 | update: true;
|
2063 | };
|
2064 | |
2065 |
|
2066 |
|
2067 |
|
2068 | filterForExposedEvent(eventType: string, query: EventQueryItem, targetEl: Element, packedEvent: ECActionEvent | ECElementEvent): boolean;
|
2069 | |
2070 |
|
2071 |
|
2072 |
|
2073 |
|
2074 |
|
2075 |
|
2076 |
|
2077 |
|
2078 |
|
2079 | findHighDownDispatchers?(name: string): Element[];
|
2080 | focusBlurEnabled?: boolean;
|
2081 | }
|
2082 | declare class ComponentView {
|
2083 | readonly group: ViewRootGroup;
|
2084 | readonly uid: string;
|
2085 | __model: ComponentModel;
|
2086 | __alive: boolean;
|
2087 | __id: string;
|
2088 | constructor();
|
2089 | init(ecModel: GlobalModel, api: ExtensionAPI): void;
|
2090 | render(model: ComponentModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2091 | dispose(ecModel: GlobalModel, api: ExtensionAPI): void;
|
2092 | updateView(model: ComponentModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2093 | updateLayout(model: ComponentModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2094 | updateVisual(model: ComponentModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2095 | /**
|
2096 | * Hook for toggle blur target series.
|
2097 | * Can be used in marker for blur or leave blur the markers
|
2098 | */
|
2099 | toggleBlurSeries(seriesModels: SeriesModel[], isBlur: boolean, ecModel: GlobalModel): void;
|
2100 | /**
|
2101 | * Traverse the new rendered elements.
|
2102 | *
|
2103 | * It will traverse the new added element in progressive rendering.
|
2104 | * And traverse all in normal rendering.
|
2105 | */
|
2106 | eachRendered(cb: (el: Element) => boolean | void): void;
|
2107 | static registerClass: ClassManager['registerClass'];
|
2108 | }
|
2109 |
|
2110 | interface TaskContext {
|
2111 | outputData?: SeriesData;
|
2112 | data?: SeriesData;
|
2113 | payload?: Payload;
|
2114 | model?: SeriesModel;
|
2115 | }
|
2116 | declare type TaskResetCallback<Ctx extends TaskContext> = (this: Task<Ctx>, context: Ctx) => TaskResetCallbackReturn<Ctx>;
|
2117 | declare type TaskResetCallbackReturn<Ctx extends TaskContext> = void | (TaskProgressCallback<Ctx> | TaskProgressCallback<Ctx>[]) | {
|
2118 | forceFirstProgress?: boolean;
|
2119 | progress: TaskProgressCallback<Ctx> | TaskProgressCallback<Ctx>[];
|
2120 | };
|
2121 | declare type TaskProgressCallback<Ctx extends TaskContext> = (this: Task<Ctx>, params: TaskProgressParams, context: Ctx) => void;
|
2122 | declare type TaskProgressParams = {
|
2123 | start: number;
|
2124 | end: number;
|
2125 | count: number;
|
2126 | next?: TaskDataIteratorNext;
|
2127 | };
|
2128 | declare type TaskPlanCallback<Ctx extends TaskContext> = (this: Task<Ctx>, context: Ctx) => TaskPlanCallbackReturn;
|
2129 | declare type TaskPlanCallbackReturn = 'reset' | false | null | undefined;
|
2130 | declare type TaskCountCallback<Ctx extends TaskContext> = (this: Task<Ctx>, context: Ctx) => number;
|
2131 | declare type TaskOnDirtyCallback<Ctx extends TaskContext> = (this: Task<Ctx>, context: Ctx) => void;
|
2132 | declare type TaskDataIteratorNext = () => number;
|
2133 | declare type TaskDefineParam<Ctx extends TaskContext> = {
|
2134 | reset?: TaskResetCallback<Ctx>;
|
2135 | plan?: TaskPlanCallback<Ctx>;
|
2136 | count?: TaskCountCallback<Ctx>;
|
2137 | onDirty?: TaskOnDirtyCallback<Ctx>;
|
2138 | };
|
2139 | declare type PerformArgs = {
|
2140 | step?: number;
|
2141 | skip?: boolean;
|
2142 | modBy?: number;
|
2143 | modDataCount?: number;
|
2144 | };
|
2145 | declare class Task<Ctx extends TaskContext> {
|
2146 | private _reset;
|
2147 | private _plan;
|
2148 | private _count;
|
2149 | private _onDirty;
|
2150 | private _progress;
|
2151 | private _callingProgress;
|
2152 | private _dirty;
|
2153 | private _modBy;
|
2154 | private _modDataCount;
|
2155 | private _upstream;
|
2156 | private _downstream;
|
2157 | private _dueEnd;
|
2158 | private _outputDueEnd;
|
2159 | private _settedOutputEnd;
|
2160 | private _dueIndex;
|
2161 | private _disposed;
|
2162 | __pipeline: Pipeline;
|
2163 | __idxInPipeline: number;
|
2164 | __block: boolean;
|
2165 | context: Ctx;
|
2166 | constructor(define: TaskDefineParam<Ctx>);
|
2167 | /**
|
2168 | * @param step Specified step.
|
2169 | * @param skip Skip customer perform call.
|
2170 | * @param modBy Sampling window size.
|
2171 | * @param modDataCount Sampling count.
|
2172 | * @return whether unfinished.
|
2173 | */
|
2174 | perform(performArgs?: PerformArgs): boolean;
|
2175 | dirty(): void;
|
2176 | private _doProgress;
|
2177 | private _doReset;
|
2178 | unfinished(): boolean;
|
2179 | /**
|
2180 | * @param downTask The downstream task.
|
2181 | * @return The downstream task.
|
2182 | */
|
2183 | pipe(downTask: Task<Ctx>): void;
|
2184 | dispose(): void;
|
2185 | getUpstream(): Task<Ctx>;
|
2186 | getDownstream(): Task<Ctx>;
|
2187 | setOutputEnd(end: number): void;
|
2188 | }
|
2189 |
|
2190 | declare type GeneralTask = Task<TaskContext>;
|
2191 | declare type SeriesTask = Task<SeriesTaskContext>;
|
2192 | declare type Pipeline = {
|
2193 | id: string;
|
2194 | head: GeneralTask;
|
2195 | tail: GeneralTask;
|
2196 | threshold: number;
|
2197 | progressiveEnabled: boolean;
|
2198 | blockIndex: number;
|
2199 | step: number;
|
2200 | count: number;
|
2201 | currentTask?: GeneralTask;
|
2202 | context?: PipelineContext;
|
2203 | };
|
2204 | declare type PipelineContext = {
|
2205 | progressiveRender: boolean;
|
2206 | modDataCount: number;
|
2207 | large: boolean;
|
2208 | };
|
2209 | declare type PerformStageTaskOpt = {
|
2210 | block?: boolean;
|
2211 | setDirty?: boolean;
|
2212 | visualType?: StageHandlerInternal['visualType'];
|
2213 | dirtyMap?: HashMap<any>;
|
2214 | };
|
2215 | interface SeriesTaskContext extends TaskContext {
|
2216 | model?: SeriesModel;
|
2217 | data?: SeriesData;
|
2218 | view?: ChartView;
|
2219 | ecModel?: GlobalModel;
|
2220 | api?: ExtensionAPI;
|
2221 | useClearVisual?: boolean;
|
2222 | plan?: StageHandlerPlan;
|
2223 | reset?: StageHandlerReset;
|
2224 | scheduler?: Scheduler;
|
2225 | payload?: Payload;
|
2226 | resetDefines?: StageHandlerProgressExecutor[];
|
2227 | }
|
2228 | interface OverallTaskContext extends TaskContext {
|
2229 | ecModel: GlobalModel;
|
2230 | api: ExtensionAPI;
|
2231 | overallReset: StageHandlerOverallReset;
|
2232 | scheduler: Scheduler;
|
2233 | payload?: Payload;
|
2234 | }
|
2235 | declare class Scheduler {
|
2236 | readonly ecInstance: EChartsType;
|
2237 | readonly api: ExtensionAPI;
|
2238 | unfinished: boolean;
|
2239 | private _dataProcessorHandlers;
|
2240 | private _visualHandlers;
|
2241 | private _allHandlers;
|
2242 | private _stageTaskMap;
|
2243 | private _pipelineMap;
|
2244 | constructor(ecInstance: EChartsType, api: ExtensionAPI, dataProcessorHandlers: StageHandlerInternal[], visualHandlers: StageHandlerInternal[]);
|
2245 | restoreData(ecModel: GlobalModel, payload: Payload): void;
|
2246 | getPerformArgs(task: GeneralTask, isBlock?: boolean): {
|
2247 | step: number;
|
2248 | modBy: number;
|
2249 | modDataCount: number;
|
2250 | };
|
2251 | getPipeline(pipelineId: string): Pipeline;
|
2252 | |
2253 |
|
2254 |
|
2255 |
|
2256 |
|
2257 |
|
2258 |
|
2259 | updateStreamModes(seriesModel: SeriesModel<SeriesOption & SeriesLargeOptionMixin>, view: ChartView): void;
|
2260 | restorePipelines(ecModel: GlobalModel): void;
|
2261 | prepareStageTasks(): void;
|
2262 | prepareView(view: ChartView, model: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI): void;
|
2263 | performDataProcessorTasks(ecModel: GlobalModel, payload?: Payload): void;
|
2264 | performVisualTasks(ecModel: GlobalModel, payload?: Payload, opt?: PerformStageTaskOpt): void;
|
2265 | private _performStageTasks;
|
2266 | performSeriesTasks(ecModel: GlobalModel): void;
|
2267 | plan(): void;
|
2268 | updatePayload(task: Task<SeriesTaskContext | OverallTaskContext>, payload: Payload | 'remain'): void;
|
2269 | private _createSeriesStageTask;
|
2270 | private _createOverallStageTask;
|
2271 | private _pipe;
|
2272 | static wrapStageHandler(stageHandler: StageHandler | StageHandlerOverallReset, visualType: StageHandlerInternal['visualType']): StageHandlerInternal;
|
2273 | }
|
2274 |
|
2275 | interface ChartView {
|
2276 | |
2277 |
|
2278 |
|
2279 |
|
2280 | incrementalPrepareRender(seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2281 | |
2282 |
|
2283 |
|
2284 |
|
2285 |
|
2286 | incrementalRender(params: StageHandlerProgressParams, seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2287 | |
2288 |
|
2289 |
|
2290 |
|
2291 | updateTransform(seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void | {
|
2292 | update: true;
|
2293 | };
|
2294 | |
2295 |
|
2296 |
|
2297 |
|
2298 | containPoint(point: number[], seriesModel: SeriesModel): boolean;
|
2299 | |
2300 |
|
2301 |
|
2302 |
|
2303 | filterForExposedEvent(eventType: string, query: EventQueryItem, targetEl: Element, packedEvent: ECActionEvent | ECElementEvent): boolean;
|
2304 | }
|
2305 | declare class ChartView {
|
2306 | type: string;
|
2307 | readonly group: ViewRootGroup;
|
2308 | readonly uid: string;
|
2309 | readonly renderTask: SeriesTask;
|
2310 | |
2311 |
|
2312 |
|
2313 |
|
2314 | ignoreLabelLineUpdate: boolean;
|
2315 | __alive: boolean;
|
2316 | __model: SeriesModel;
|
2317 | __id: string;
|
2318 | static protoInitialize: void;
|
2319 | constructor();
|
2320 | init(ecModel: GlobalModel, api: ExtensionAPI): void;
|
2321 | render(seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2322 | /**
|
2323 | * Highlight series or specified data item.
|
2324 | */
|
2325 | highlight(seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2326 | /**
|
2327 | * Downplay series or specified data item.
|
2328 | */
|
2329 | downplay(seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2330 | /**
|
2331 | * Remove self.
|
2332 | */
|
2333 | remove(ecModel: GlobalModel, api: ExtensionAPI): void;
|
2334 | /**
|
2335 | * Dispose self.
|
2336 | */
|
2337 | dispose(ecModel: GlobalModel, api: ExtensionAPI): void;
|
2338 | updateView(seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2339 | updateLayout(seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2340 | updateVisual(seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload: Payload): void;
|
2341 | /**
|
2342 | * Traverse the new rendered elements.
|
2343 | *
|
2344 | * It will traverse the new added element in progressive rendering.
|
2345 | * And traverse all in normal rendering.
|
2346 | */
|
2347 | eachRendered(cb: (el: Element) => boolean | void): void;
|
2348 | static markUpdateMethod(payload: Payload, methodName: keyof ChartView): void;
|
2349 | static registerClass: ClassManager['registerClass'];
|
2350 | }
|
2351 |
|
2352 | declare const availableMethods: (keyof EChartsType)[];
|
2353 | interface ExtensionAPI extends Pick<EChartsType, (typeof availableMethods)[number]> {
|
2354 | }
|
2355 | declare abstract class ExtensionAPI {
|
2356 | constructor(ecInstance: EChartsType);
|
2357 | abstract getCoordinateSystems(): CoordinateSystemMaster[];
|
2358 | abstract getComponentByElement(el: Element): ComponentModel;
|
2359 | abstract enterEmphasis(el: Element, highlightDigit?: number): void;
|
2360 | abstract leaveEmphasis(el: Element, highlightDigit?: number): void;
|
2361 | abstract enterSelect(el: Element): void;
|
2362 | abstract leaveSelect(el: Element): void;
|
2363 | abstract enterBlur(el: Element): void;
|
2364 | abstract leaveBlur(el: Element): void;
|
2365 | abstract getViewOfComponentModel(componentModel: ComponentModel): ComponentView;
|
2366 | abstract getViewOfSeriesModel(seriesModel: SeriesModel): ChartView;
|
2367 | abstract getModel(): GlobalModel;
|
2368 | }
|
2369 |
|
2370 | declare const AXIS_TYPES: {
|
2371 | readonly value: 1;
|
2372 | readonly category: 1;
|
2373 | readonly time: 1;
|
2374 | readonly log: 1;
|
2375 | };
|
2376 | declare type OptionAxisType = keyof typeof AXIS_TYPES;
|
2377 | interface AxisBaseOptionCommon extends ComponentOption, AnimationOptionMixin {
|
2378 | type?: OptionAxisType;
|
2379 | show?: boolean;
|
2380 | inverse?: boolean;
|
2381 | name?: string;
|
2382 | nameLocation?: 'start' | 'middle' | 'end';
|
2383 | nameRotate?: number;
|
2384 | nameTruncate?: {
|
2385 | maxWidth?: number;
|
2386 | ellipsis?: string;
|
2387 | placeholder?: string;
|
2388 | };
|
2389 | nameTextStyle?: AxisNameTextStyleOption;
|
2390 | nameGap?: number;
|
2391 | silent?: boolean;
|
2392 | triggerEvent?: boolean;
|
2393 | tooltip?: {
|
2394 | show?: boolean;
|
2395 | };
|
2396 | axisLabel?: AxisLabelBaseOption;
|
2397 | axisPointer?: CommonAxisPointerOption;
|
2398 | axisLine?: AxisLineOption;
|
2399 | axisTick?: AxisTickOption;
|
2400 | minorTick?: MinorTickOption;
|
2401 | splitLine?: SplitLineOption;
|
2402 | minorSplitLine?: MinorSplitLineOption;
|
2403 | splitArea?: SplitAreaOption;
|
2404 | |
2405 |
|
2406 |
|
2407 |
|
2408 |
|
2409 |
|
2410 | min?: ScaleDataValue | 'dataMin' | ((extent: {
|
2411 | min: number;
|
2412 | max: number;
|
2413 | }) => ScaleDataValue);
|
2414 | |
2415 |
|
2416 |
|
2417 |
|
2418 |
|
2419 |
|
2420 | max?: ScaleDataValue | 'dataMax' | ((extent: {
|
2421 | min: number;
|
2422 | max: number;
|
2423 | }) => ScaleDataValue);
|
2424 | startValue?: number;
|
2425 | }
|
2426 | interface NumericAxisBaseOptionCommon extends AxisBaseOptionCommon {
|
2427 | boundaryGap?: [number | string, number | string];
|
2428 | |
2429 |
|
2430 |
|
2431 | splitNumber?: number;
|
2432 | |
2433 |
|
2434 |
|
2435 | interval?: number;
|
2436 | |
2437 |
|
2438 |
|
2439 | minInterval?: number;
|
2440 | |
2441 |
|
2442 |
|
2443 | maxInterval?: number;
|
2444 | |
2445 |
|
2446 |
|
2447 |
|
2448 |
|
2449 |
|
2450 | alignTicks?: boolean;
|
2451 | }
|
2452 | interface CategoryAxisBaseOption extends AxisBaseOptionCommon {
|
2453 | type?: 'category';
|
2454 | boundaryGap?: boolean;
|
2455 | axisLabel?: AxisLabelOption<'category'> & {
|
2456 | interval?: 'auto' | number | ((index: number, value: string) => boolean);
|
2457 | };
|
2458 | data?: (OrdinalRawValue | {
|
2459 | value: OrdinalRawValue;
|
2460 | textStyle?: TextCommonOption;
|
2461 | })[];
|
2462 | deduplication?: boolean;
|
2463 | axisTick?: AxisBaseOptionCommon['axisTick'] & {
|
2464 | alignWithLabel?: boolean;
|
2465 | interval?: 'auto' | number | ((index: number, value: string) => boolean);
|
2466 | };
|
2467 | }
|
2468 | interface ValueAxisBaseOption extends NumericAxisBaseOptionCommon {
|
2469 | type?: 'value';
|
2470 | axisLabel?: AxisLabelOption<'value'>;
|
2471 | /**
|
2472 | * Optional value can be:
|
2473 | * + `false`: always include value 0.
|
2474 | * + `true`: the axis may not contain zero position.
|
2475 | */
|
2476 | scale?: boolean;
|
2477 | }
|
2478 | interface LogAxisBaseOption extends NumericAxisBaseOptionCommon {
|
2479 | type?: 'log';
|
2480 | axisLabel?: AxisLabelOption<'log'>;
|
2481 | logBase?: number;
|
2482 | }
|
2483 | interface TimeAxisBaseOption extends NumericAxisBaseOptionCommon {
|
2484 | type?: 'time';
|
2485 | axisLabel?: AxisLabelOption<'time'>;
|
2486 | }
|
2487 | interface AxisNameTextStyleOption extends TextCommonOption {
|
2488 | rich?: Dictionary<TextCommonOption>;
|
2489 | }
|
2490 | interface AxisLineOption {
|
2491 | show?: boolean | 'auto';
|
2492 | onZero?: boolean;
|
2493 | onZeroAxisIndex?: number;
|
2494 | symbol?: string | [string, string];
|
2495 | symbolSize?: number[];
|
2496 | symbolOffset?: string | number | (string | number)[];
|
2497 | lineStyle?: LineStyleOption;
|
2498 | }
|
2499 | interface AxisTickOption {
|
2500 | show?: boolean | 'auto';
|
2501 | inside?: boolean;
|
2502 | length?: number;
|
2503 | lineStyle?: LineStyleOption;
|
2504 | customValues?: (number | string | Date)[];
|
2505 | }
|
2506 | declare type AxisLabelValueFormatter = (value: number, index: number) => string;
|
2507 | declare type AxisLabelCategoryFormatter = (value: string, index: number) => string;
|
2508 | declare type TimeAxisLabelUnitFormatter = AxisLabelValueFormatter | string[] | string;
|
2509 | declare type TimeAxisLabelFormatterOption = string | ((value: number, index: number, extra: {
|
2510 | level: number;
|
2511 | }) => string) | {
|
2512 | year?: TimeAxisLabelUnitFormatter;
|
2513 | month?: TimeAxisLabelUnitFormatter;
|
2514 | week?: TimeAxisLabelUnitFormatter;
|
2515 | day?: TimeAxisLabelUnitFormatter;
|
2516 | hour?: TimeAxisLabelUnitFormatter;
|
2517 | minute?: TimeAxisLabelUnitFormatter;
|
2518 | second?: TimeAxisLabelUnitFormatter;
|
2519 | millisecond?: TimeAxisLabelUnitFormatter;
|
2520 | inherit?: boolean;
|
2521 | };
|
2522 | declare type LabelFormatters = {
|
2523 | value: AxisLabelValueFormatter | string;
|
2524 | log: AxisLabelValueFormatter | string;
|
2525 | category: AxisLabelCategoryFormatter | string;
|
2526 | time: TimeAxisLabelFormatterOption;
|
2527 | };
|
2528 | interface AxisLabelBaseOption extends Omit<TextCommonOption, 'color'> {
|
2529 | show?: boolean;
|
2530 | inside?: boolean;
|
2531 | rotate?: number;
|
2532 | showMinLabel?: boolean;
|
2533 | showMaxLabel?: boolean;
|
2534 | alignMinLabel?: TextAlign;
|
2535 | alignMaxLabel?: TextAlign;
|
2536 | verticalAlignMinLabel?: TextVerticalAlign;
|
2537 | verticalAlignMaxLabel?: TextVerticalAlign;
|
2538 | margin?: number;
|
2539 | rich?: Dictionary<TextCommonOption>;
|
2540 | |
2541 |
|
2542 |
|
2543 | hideOverlap?: boolean;
|
2544 | customValues?: (number | string | Date)[];
|
2545 | color?: ColorString | ((value?: string | number, index?: number) => ColorString);
|
2546 | overflow?: TextStyleProps['overflow'];
|
2547 | }
|
2548 | interface AxisLabelOption<TType extends OptionAxisType> extends AxisLabelBaseOption {
|
2549 | formatter?: LabelFormatters[TType];
|
2550 | }
|
2551 | interface MinorTickOption {
|
2552 | show?: boolean;
|
2553 | splitNumber?: number;
|
2554 | length?: number;
|
2555 | lineStyle?: LineStyleOption;
|
2556 | }
|
2557 | interface SplitLineOption {
|
2558 | show?: boolean;
|
2559 | interval?: 'auto' | number | ((index: number, value: string) => boolean);
|
2560 | lineStyle?: LineStyleOption<ZRColor | ZRColor[]>;
|
2561 | }
|
2562 | interface MinorSplitLineOption {
|
2563 | show?: boolean;
|
2564 | lineStyle?: LineStyleOption;
|
2565 | }
|
2566 | interface SplitAreaOption {
|
2567 | show?: boolean;
|
2568 | interval?: 'auto' | number | ((index: number, value: string) => boolean);
|
2569 | areaStyle?: AreaStyleOption<ZRColor[]>;
|
2570 | }
|
2571 | declare type AxisBaseOption = ValueAxisBaseOption | LogAxisBaseOption | CategoryAxisBaseOption | TimeAxisBaseOption | AxisBaseOptionCommon;
|
2572 |
|
2573 | interface AxisModelCommonMixin<Opt extends AxisBaseOption> extends Pick<Model<Opt>, 'option'> {
|
2574 | axis: Axis;
|
2575 | }
|
2576 | declare class AxisModelCommonMixin<Opt extends AxisBaseOption> {
|
2577 | getNeedCrossZero(): boolean;
|
2578 | /**
|
2579 | * Should be implemented by each axis model if necessary.
|
2580 | * @return coordinate system model
|
2581 | */
|
2582 | getCoordSysModel(): CoordinateSystemHostModel;
|
2583 | }
|
2584 |
|
2585 | declare class OrdinalMeta {
|
2586 | readonly categories: OrdinalRawValue[];
|
2587 | private _needCollect;
|
2588 | private _deduplication;
|
2589 | private _map;
|
2590 | readonly uid: number;
|
2591 | constructor(opt: {
|
2592 | categories?: OrdinalRawValue[];
|
2593 | needCollect?: boolean;
|
2594 | deduplication?: boolean;
|
2595 | });
|
2596 | static createByAxisModel(axisModel: Model): OrdinalMeta;
|
2597 | getOrdinal(category: OrdinalRawValue): OrdinalNumber;
|
2598 | /**
|
2599 | * @return The ordinal. If not found, return NaN.
|
2600 | */
|
2601 | parseAndCollect(category: OrdinalRawValue | OrdinalNumber): OrdinalNumber;
|
2602 | private _getOrCreateMap;
|
2603 | }
|
2604 |
|
2605 | declare function registerImpl(name: string, impl: any): void;
|
2606 |
|
2607 | declare const extensionRegisters: {
|
2608 | registerPreprocessor: typeof registerPreprocessor;
|
2609 | registerProcessor: typeof registerProcessor;
|
2610 | registerPostInit: typeof registerPostInit;
|
2611 | registerPostUpdate: typeof registerPostUpdate;
|
2612 | registerUpdateLifecycle: typeof registerUpdateLifecycle;
|
2613 | registerAction: typeof registerAction;
|
2614 | registerCoordinateSystem: typeof registerCoordinateSystem;
|
2615 | registerLayout: typeof registerLayout;
|
2616 | registerVisual: typeof registerVisual;
|
2617 | registerTransform: typeof registerExternalTransform;
|
2618 | registerLoading: typeof registerLoading;
|
2619 | registerMap: typeof registerMap;
|
2620 | registerImpl: typeof registerImpl;
|
2621 | PRIORITY: {
|
2622 | PROCESSOR: {
|
2623 | FILTER: number;
|
2624 | SERIES_FILTER: number;
|
2625 | STATISTIC: number;
|
2626 | };
|
2627 | VISUAL: {
|
2628 | LAYOUT: number;
|
2629 | PROGRESSIVE_LAYOUT: number;
|
2630 | GLOBAL: number;
|
2631 | CHART: number;
|
2632 | POST_CHART_LAYOUT: number;
|
2633 | COMPONENT: number;
|
2634 | BRUSH: number;
|
2635 | CHART_ITEM: number;
|
2636 | ARIA: number;
|
2637 | DECAL: number;
|
2638 | };
|
2639 | };
|
2640 | ComponentModel: typeof ComponentModel;
|
2641 | ComponentView: typeof ComponentView;
|
2642 | SeriesModel: typeof SeriesModel;
|
2643 | ChartView: typeof ChartView;
|
2644 | registerComponentModel(ComponentModelClass: Constructor): void;
|
2645 | registerComponentView(ComponentViewClass: typeof ComponentView): void;
|
2646 | registerSeriesModel(SeriesModelClass: Constructor): void;
|
2647 | registerChartView(ChartViewClass: typeof ChartView): void;
|
2648 | registerSubTypeDefaulter(componentType: string, defaulter: SubTypeDefaulter): void;
|
2649 | registerPainter(painterType: string, PainterCtor: Parameters<typeof registerPainter>[1]): void;
|
2650 | };
|
2651 | declare type EChartsExtensionInstallRegisters = typeof extensionRegisters;
|
2652 | declare type EChartsExtensionInstaller = (ec: EChartsExtensionInstallRegisters) => void;
|
2653 | interface EChartsExtension {
|
2654 | install: EChartsExtensionInstaller;
|
2655 | }
|
2656 | declare function use(ext: EChartsExtensionInstaller | EChartsExtension | (EChartsExtensionInstaller | EChartsExtension)[]): void;
|
2657 |
|
2658 | interface AxisModelExtendedInCreator {
|
2659 | getCategories(rawData?: boolean): OrdinalRawValue[] | CategoryAxisBaseOption['data'];
|
2660 | getOrdinalMeta(): OrdinalMeta;
|
2661 | }
|
2662 |
|
2663 |
|
2664 |
|
2665 |
|
2666 |
|
2667 | interface AxisBaseModel<T extends AxisBaseOptionCommon = AxisBaseOptionCommon> extends ComponentModel<T>, AxisModelCommonMixin<T>, AxisModelExtendedInCreator {
|
2668 | axis: Axis;
|
2669 | }
|
2670 |
|
2671 | declare function createAxisLabels(axis: Axis): {
|
2672 | labels: {
|
2673 | level?: number;
|
2674 | formattedLabel: string;
|
2675 | rawLabel: string;
|
2676 | tickValue: number;
|
2677 | }[];
|
2678 | labelCategoryInterval?: number;
|
2679 | };
|
2680 |
|
2681 |
|
2682 |
|
2683 |
|
2684 |
|
2685 | declare function calculateCategoryInterval(axis: Axis): number;
|
2686 |
|
2687 | interface ScaleRawExtentResult {
|
2688 | readonly min: number;
|
2689 | readonly max: number;
|
2690 | readonly minFixed: boolean;
|
2691 | readonly maxFixed: boolean;
|
2692 | readonly isBlank: boolean;
|
2693 | }
|
2694 | declare class ScaleRawExtentInfo {
|
2695 | private _needCrossZero;
|
2696 | private _isOrdinal;
|
2697 | private _axisDataLen;
|
2698 | private _boundaryGapInner;
|
2699 | private _modelMinRaw;
|
2700 | private _modelMaxRaw;
|
2701 | private _modelMinNum;
|
2702 | private _modelMaxNum;
|
2703 | private _dataMin;
|
2704 | private _dataMax;
|
2705 | private _determinedMin;
|
2706 | private _determinedMax;
|
2707 | readonly frozen: boolean;
|
2708 | constructor(scale: Scale, model: AxisBaseModel, originalExtent: number[]);
|
2709 | /**
|
2710 | * Parameters depending on outside (like model, user callback)
|
2711 | * are prepared and fixed here.
|
2712 | */
|
2713 | private _prepareParams;
|
2714 | /**
|
2715 | * Calculate extent by prepared parameters.
|
2716 | * This method has no external dependency and can be called duplicatedly,
|
2717 | * getting the same result.
|
2718 | * If parameters changed, should call this method to recalcuate.
|
2719 | */
|
2720 | calculate(): ScaleRawExtentResult;
|
2721 | modifyDataMinMax(minMaxName: 'min' | 'max', val: number): void;
|
2722 | setDeterminedMinMax(minMaxName: 'min' | 'max', val: number): void;
|
2723 | freeze(): void;
|
2724 | }
|
2725 |
|
2726 | declare abstract class Scale<SETTING extends Dictionary<unknown> = Dictionary<unknown>> {
|
2727 | type: string;
|
2728 | private _setting;
|
2729 | protected _extent: [number, number];
|
2730 | private _isBlank;
|
2731 | readonly rawExtentInfo: ScaleRawExtentInfo;
|
2732 | constructor(setting?: SETTING);
|
2733 | getSetting<KEY extends keyof SETTING>(name: KEY): SETTING[KEY];
|
2734 | /**
|
2735 | * Parse input val to valid inner number.
|
2736 | * Notice: This would be a trap here, If the implementation
|
2737 | * of this method depends on extent, and this method is used
|
2738 | * before extent set (like in dataZoom), it would be wrong.
|
2739 | * Nevertheless, parse does not depend on extent generally.
|
2740 | */
|
2741 | abstract parse(val: OptionDataValue): number;
|
2742 | /**
|
2743 | * Whether contain the given value.
|
2744 | */
|
2745 | abstract contain(val: ScaleDataValue): boolean;
|
2746 | /**
|
2747 | * Normalize value to linear [0, 1], return 0.5 if extent span is 0.
|
2748 | */
|
2749 | abstract normalize(val: ScaleDataValue): number;
|
2750 | /**
|
2751 | * Scale normalized value to extent.
|
2752 | */
|
2753 | abstract scale(val: number): number;
|
2754 | /**
|
2755 | * Set extent from data
|
2756 | */
|
2757 | unionExtent(other: [number, number]): void;
|
2758 | /**
|
2759 | * Set extent from data
|
2760 | */
|
2761 | unionExtentFromData(data: SeriesData, dim: DimensionName | DimensionLoose): void;
|
2762 | /**
|
2763 | * Get extent
|
2764 | *
|
2765 | * Extent is always in increase order.
|
2766 | */
|
2767 | getExtent(): [number, number];
|
2768 | /**
|
2769 | * Set extent
|
2770 | */
|
2771 | setExtent(start: number, end: number): void;
|
2772 | /**
|
2773 | * If value is in extent range
|
2774 | */
|
2775 | isInExtentRange(value: number): boolean;
|
2776 | /**
|
2777 | * When axis extent depends on data and no data exists,
|
2778 | * axis ticks should not be drawn, which is named 'blank'.
|
2779 | */
|
2780 | isBlank(): boolean;
|
2781 | /**
|
2782 | * When axis extent depends on data and no data exists,
|
2783 | * axis ticks should not be drawn, which is named 'blank'.
|
2784 | */
|
2785 | setBlank(isBlank: boolean): void;
|
2786 | /**
|
2787 | * Update interval and extent of intervals for nice ticks
|
2788 | *
|
2789 | * @param splitNumber Approximated tick numbers. Optional.
|
2790 | * The implementation of `niceTicks` should decide tick numbers
|
2791 | * whether `splitNumber` is given.
|
2792 | * @param minInterval Optional.
|
2793 | * @param maxInterval Optional.
|
2794 | */
|
2795 | abstract calcNiceTicks(splitNumber?: number, minInterval?: number, maxInterval?: number): void;
|
2796 | abstract calcNiceExtent(opt?: {
|
2797 | splitNumber?: number;
|
2798 | fixMin?: boolean;
|
2799 | fixMax?: boolean;
|
2800 | minInterval?: number;
|
2801 | maxInterval?: number;
|
2802 | }): void;
|
2803 | /**
|
2804 | * @return label of the tick.
|
2805 | */
|
2806 | abstract getLabel(tick: ScaleTick): string;
|
2807 | abstract getTicks(): ScaleTick[];
|
2808 | abstract getMinorTicks(splitNumber: number): number[][];
|
2809 | static registerClass: ClassManager['registerClass'];
|
2810 | static getClass: ClassManager['getClass'];
|
2811 | }
|
2812 |
|
2813 | interface TickCoord {
|
2814 | coord: number;
|
2815 | tickValue?: ScaleTick['value'];
|
2816 | }
|
2817 |
|
2818 |
|
2819 |
|
2820 | declare class Axis {
|
2821 | |
2822 |
|
2823 |
|
2824 |
|
2825 |
|
2826 |
|
2827 |
|
2828 | type: OptionAxisType;
|
2829 | readonly dim: DimensionName;
|
2830 | scale: Scale;
|
2831 | private _extent;
|
2832 | model: AxisBaseModel;
|
2833 | onBand: CategoryAxisBaseOption['boundaryGap'];
|
2834 | inverse: AxisBaseOption['inverse'];
|
2835 | constructor(dim: DimensionName, scale: Scale, extent: [number, number]);
|
2836 | /**
|
2837 | * If axis extent contain given coord
|
2838 | */
|
2839 | contain(coord: number): boolean;
|
2840 | /**
|
2841 | * If axis extent contain given data
|
2842 | */
|
2843 | containData(data: ScaleDataValue): boolean;
|
2844 | /**
|
2845 | * Get coord extent.
|
2846 | */
|
2847 | getExtent(): [number, number];
|
2848 | /**
|
2849 | * Get precision used for formatting
|
2850 | */
|
2851 | getPixelPrecision(dataExtent?: [number, number]): number;
|
2852 | /**
|
2853 | * Set coord extent
|
2854 | */
|
2855 | setExtent(start: number, end: number): void;
|
2856 | /**
|
2857 | * Convert data to coord. Data is the rank if it has an ordinal scale
|
2858 | */
|
2859 | dataToCoord(data: ScaleDataValue, clamp?: boolean): number;
|
2860 | /**
|
2861 | * Convert coord to data. Data is the rank if it has an ordinal scale
|
2862 | */
|
2863 | coordToData(coord: number, clamp?: boolean): number;
|
2864 | /**
|
2865 | * Convert pixel point to data in axis
|
2866 | */
|
2867 | pointToData(point: number[], clamp?: boolean): number;
|
2868 | /**
|
2869 | * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`,
|
2870 | * `axis.getTicksCoords` considers `onBand`, which is used by
|
2871 | * `boundaryGap:true` of category axis and splitLine and splitArea.
|
2872 | * @param opt.tickModel default: axis.model.getModel('axisTick')
|
2873 | * @param opt.clamp If `true`, the first and the last
|
2874 | * tick must be at the axis end points. Otherwise, clip ticks
|
2875 | * that outside the axis extent.
|
2876 | */
|
2877 | getTicksCoords(opt?: {
|
2878 | tickModel?: Model;
|
2879 | clamp?: boolean;
|
2880 | }): TickCoord[];
|
2881 | getMinorTicksCoords(): TickCoord[][];
|
2882 | getViewLabels(): ReturnType<typeof createAxisLabels>['labels'];
|
2883 | getLabelModel(): Model<AxisBaseOption['axisLabel']>;
|
2884 | /**
|
2885 | * Notice here we only get the default tick model. For splitLine
|
2886 | * or splitArea, we should pass the splitLineModel or splitAreaModel
|
2887 | * manually when calling `getTicksCoords`.
|
2888 | * In GL, this method may be overridden to:
|
2889 | * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));`
|
2890 | */
|
2891 | getTickModel(): Model;
|
2892 | /**
|
2893 | * Get width of band
|
2894 | */
|
2895 | getBandWidth(): number;
|
2896 | /**
|
2897 | * Get axis rotate, by degree.
|
2898 | */
|
2899 | getRotate: () => number;
|
2900 | /**
|
2901 | * Only be called in category axis.
|
2902 | * Can be overridden, consider other axes like in 3D.
|
2903 | * @return Auto interval for cateogry axis tick and label
|
2904 | */
|
2905 | calculateCategoryInterval(): ReturnType<typeof calculateCategoryInterval>;
|
2906 | }
|
2907 |
|
2908 | declare type MarkerStatisticType = 'average' | 'min' | 'max' | 'median';
|
2909 | /**
|
2910 | * Option to specify where to put the marker.
|
2911 | */
|
2912 | interface MarkerPositionOption {
|
2913 | x?: number | string;
|
2914 | y?: number | string;
|
2915 | |
2916 |
|
2917 |
|
2918 | coord?: (ScaleDataValue | MarkerStatisticType)[];
|
2919 | xAxis?: ScaleDataValue;
|
2920 | yAxis?: ScaleDataValue;
|
2921 | radiusAxis?: ScaleDataValue;
|
2922 | angleAxis?: ScaleDataValue;
|
2923 | type?: MarkerStatisticType;
|
2924 | |
2925 |
|
2926 |
|
2927 |
|
2928 | valueIndex?: number;
|
2929 | valueDim?: string;
|
2930 | |
2931 |
|
2932 |
|
2933 | value?: string | number;
|
2934 | }
|
2935 | interface MarkerOption extends ComponentOption, AnimationOptionMixin {
|
2936 | silent?: boolean;
|
2937 | data?: unknown[];
|
2938 | tooltip?: CommonTooltipOption<unknown> & {
|
2939 | trigger?: 'item' | 'axis' | boolean | 'none';
|
2940 | };
|
2941 | }
|
2942 |
|
2943 | interface MarkAreaStateOption {
|
2944 | itemStyle?: ItemStyleOption;
|
2945 | label?: SeriesLabelOption;
|
2946 | }
|
2947 | interface MarkAreaDataItemOptionBase extends MarkAreaStateOption, StatesOptionMixin<MarkAreaStateOption, StatesMixinBase> {
|
2948 | name?: string;
|
2949 | }
|
2950 | interface MarkArea1DDataItemOption extends MarkAreaDataItemOptionBase {
|
2951 | xAxis?: number;
|
2952 | yAxis?: number;
|
2953 | type?: MarkerStatisticType;
|
2954 | valueIndex?: number;
|
2955 | valueDim?: string;
|
2956 | }
|
2957 | interface MarkArea2DDataItemDimOption extends MarkAreaDataItemOptionBase, MarkerPositionOption {
|
2958 | }
|
2959 | declare type MarkArea2DDataItemOption = [
|
2960 | MarkArea2DDataItemDimOption,
|
2961 | MarkArea2DDataItemDimOption
|
2962 | ];
|
2963 | interface MarkAreaOption extends MarkerOption, MarkAreaStateOption, StatesOptionMixin<MarkAreaStateOption, StatesMixinBase> {
|
2964 | mainType?: 'markArea';
|
2965 | precision?: number;
|
2966 | data?: (MarkArea1DDataItemOption | MarkArea2DDataItemOption)[];
|
2967 | }
|
2968 |
|
2969 | declare const dimPermutations: readonly [readonly ["x0", "y0"], readonly ["x1", "y0"], readonly ["x1", "y1"], readonly ["x0", "y1"]];
|
2970 |
|
2971 | interface BaseBarSeriesOption<StateOption, ExtraStateOption extends StatesMixinBase = DefaultStatesMixin> extends SeriesOption<StateOption, ExtraStateOption>, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin {
|
2972 | |
2973 |
|
2974 |
|
2975 | barMinHeight?: number;
|
2976 | |
2977 |
|
2978 |
|
2979 | barMinAngle?: number;
|
2980 | |
2981 |
|
2982 |
|
2983 | barMaxWidth?: number | string;
|
2984 | barMinWidth?: number | string;
|
2985 | |
2986 |
|
2987 |
|
2988 |
|
2989 | barWidth?: number | string;
|
2990 | |
2991 |
|
2992 |
|
2993 | barGap?: string | number;
|
2994 | |
2995 |
|
2996 |
|
2997 | barCategoryGap?: string | number;
|
2998 | large?: boolean;
|
2999 | largeThreshold?: number;
|
3000 | }
|
3001 |
|
3002 | interface LayoutRect extends BoundingRect {
|
3003 | margin: number[];
|
3004 | }
|
3005 |
|
3006 |
|
3007 |
|
3008 | declare function getLayoutRect(positionInfo: BoxLayoutOptionMixin & {
|
3009 | aspect?: number;
|
3010 | }, containerRect: {
|
3011 | width: number;
|
3012 | height: number;
|
3013 | }, margin?: number | number[]): LayoutRect;
|
3014 |
|
3015 | interface GridOption extends ComponentOption, BoxLayoutOptionMixin, ShadowOptionMixin {
|
3016 | mainType?: 'grid';
|
3017 | show?: boolean;
|
3018 | containLabel?: boolean;
|
3019 | backgroundColor?: ZRColor;
|
3020 | borderWidth?: number;
|
3021 | borderColor?: ZRColor;
|
3022 | tooltip?: any;
|
3023 | }
|
3024 |
|
3025 | declare type CartesianAxisPosition = 'top' | 'bottom' | 'left' | 'right';
|
3026 | declare type CartesianAxisOption = AxisBaseOption & {
|
3027 | gridIndex?: number;
|
3028 | gridId?: string;
|
3029 | position?: CartesianAxisPosition;
|
3030 | offset?: number;
|
3031 | categorySortInfo?: OrdinalSortInfo;
|
3032 | };
|
3033 | declare type XAXisOption = CartesianAxisOption & {
|
3034 | mainType?: 'xAxis';
|
3035 | };
|
3036 | declare type YAXisOption = CartesianAxisOption & {
|
3037 | mainType?: 'yAxis';
|
3038 | };
|
3039 |
|
3040 | declare type AngleAxisOption = AxisBaseOption & {
|
3041 | mainType?: 'angleAxis';
|
3042 | |
3043 |
|
3044 |
|
3045 | polarIndex?: number;
|
3046 | |
3047 |
|
3048 |
|
3049 | polarId?: string;
|
3050 | startAngle?: number;
|
3051 | endAngle?: number;
|
3052 | clockwise?: boolean;
|
3053 | axisLabel?: AxisBaseOption['axisLabel'];
|
3054 | };
|
3055 | declare type RadiusAxisOption = AxisBaseOption & {
|
3056 | mainType?: 'radiusAxis';
|
3057 | |
3058 |
|
3059 |
|
3060 | polarIndex?: number;
|
3061 | |
3062 |
|
3063 |
|
3064 | polarId?: string;
|
3065 | };
|
3066 |
|
3067 | interface PolarOption extends ComponentOption, CircleLayoutOptionMixin {
|
3068 | mainType?: 'polar';
|
3069 | }
|
3070 |
|
3071 |
|
3072 |
|
3073 |
|
3074 |
|
3075 |
|
3076 |
|
3077 | declare type BrushType = 'polygon' | 'rect' | 'lineX' | 'lineY';
|
3078 |
|
3079 |
|
3080 |
|
3081 |
|
3082 |
|
3083 |
|
3084 | declare type BrushTypeUncertain = BrushType | false | 'auto';
|
3085 | declare type BrushMode = 'single' | 'multiple';
|
3086 | declare type BrushDimensionMinMax = number[];
|
3087 | declare type BrushAreaRange = BrushDimensionMinMax | BrushDimensionMinMax[];
|
3088 | interface BrushCoverConfig {
|
3089 | brushType: BrushType;
|
3090 | id?: string;
|
3091 | range?: BrushAreaRange;
|
3092 | panelId?: string;
|
3093 | brushMode?: BrushMode;
|
3094 | brushStyle?: Pick<PathStyleProps, BrushStyleKey>;
|
3095 | transformable?: boolean;
|
3096 | removeOnClick?: boolean;
|
3097 | z?: number;
|
3098 | }
|
3099 | declare type BrushStyleKey = 'fill' | 'stroke' | 'lineWidth' | 'opacity' | 'shadowBlur' | 'shadowOffsetX' | 'shadowOffsetY' | 'shadowColor';
|
3100 |
|
3101 | declare type GeoSVGSourceInput = string | Document | SVGElement;
|
3102 | declare type GeoJSONSourceInput = string | GeoJSON | GeoJSONCompressed;
|
3103 | interface NameMap {
|
3104 | [regionName: string]: string;
|
3105 | }
|
3106 | interface GeoSpecialAreas {
|
3107 | [areaName: string]: {
|
3108 | left: number;
|
3109 | top: number;
|
3110 | width?: number;
|
3111 | height?: number;
|
3112 | };
|
3113 | }
|
3114 | interface GeoJSON extends GeoJSONFeatureCollection<GeoJSONGeometry> {
|
3115 | }
|
3116 | interface GeoJSONCompressed extends GeoJSONFeatureCollection<GeoJSONGeometryCompressed> {
|
3117 | UTF8Encoding?: boolean;
|
3118 | UTF8Scale?: number;
|
3119 | }
|
3120 | interface GeoJSONFeatureCollection<G> {
|
3121 | type: 'FeatureCollection';
|
3122 | features: GeoJSONFeature<G>[];
|
3123 | }
|
3124 | interface GeoJSONFeature<G = GeoJSONGeometry> {
|
3125 | type: 'Feature';
|
3126 | id?: string | number;
|
3127 | properties: {
|
3128 | name?: string;
|
3129 | cp?: number[];
|
3130 | [key: string]: any;
|
3131 | };
|
3132 | geometry: G;
|
3133 | }
|
3134 | declare type GeoJSONGeometry = GeoJSONGeometryPoint | GeoJSONGeometryMultiPoint | GeoJSONGeometryLineString | GeoJSONGeometryMultiLineString | GeoJSONGeometryPolygon | GeoJSONGeometryMultiPolygon;
|
3135 | declare type GeoJSONGeometryCompressed = GeoJSONGeometryPolygonCompressed | GeoJSONGeometryMultiPolygonCompressed | GeoJSONGeometryLineStringCompressed | GeoJSONGeometryMultiLineStringCompressed;
|
3136 | interface GeoJSONGeometryPoint {
|
3137 | type: 'Point';
|
3138 | coordinates: number[];
|
3139 | }
|
3140 | interface GeoJSONGeometryMultiPoint {
|
3141 | type: 'MultiPoint';
|
3142 | coordinates: number[][];
|
3143 | }
|
3144 | interface GeoJSONGeometryLineString {
|
3145 | type: 'LineString';
|
3146 | coordinates: number[][];
|
3147 | }
|
3148 | interface GeoJSONGeometryLineStringCompressed {
|
3149 | type: 'LineString';
|
3150 | coordinates: string;
|
3151 | encodeOffsets: number[];
|
3152 | }
|
3153 | interface GeoJSONGeometryMultiLineString {
|
3154 | type: 'MultiLineString';
|
3155 | coordinates: number[][][];
|
3156 | }
|
3157 | interface GeoJSONGeometryMultiLineStringCompressed {
|
3158 | type: 'MultiLineString';
|
3159 | coordinates: string[];
|
3160 | encodeOffsets: number[][];
|
3161 | }
|
3162 | interface GeoJSONGeometryPolygon {
|
3163 | type: 'Polygon';
|
3164 | coordinates: number[][][];
|
3165 | }
|
3166 | interface GeoJSONGeometryPolygonCompressed {
|
3167 | type: 'Polygon';
|
3168 | coordinates: string[];
|
3169 | encodeOffsets: number[][];
|
3170 | }
|
3171 | interface GeoJSONGeometryMultiPolygon {
|
3172 | type: 'MultiPolygon';
|
3173 | coordinates: number[][][][];
|
3174 | }
|
3175 | interface GeoJSONGeometryMultiPolygonCompressed {
|
3176 | type: 'MultiPolygon';
|
3177 | coordinates: string[][];
|
3178 | encodeOffsets: number[][][];
|
3179 | }
|
3180 | interface GeoResource {
|
3181 | readonly type: 'geoJSON' | 'geoSVG';
|
3182 | load(nameMap: NameMap, nameProperty: string): {
|
3183 | boundingRect: BoundingRect;
|
3184 | regions: Region[];
|
3185 | regionsMap: HashMap<Region>;
|
3186 | };
|
3187 | }
|
3188 |
|
3189 |
|
3190 |
|
3191 |
|
3192 | interface ProjectionStream {
|
3193 | point(x: number, y: number): void;
|
3194 | lineStart(): void;
|
3195 | lineEnd(): void;
|
3196 | polygonStart(): void;
|
3197 | polygonEnd(): void;
|
3198 | |
3199 |
|
3200 |
|
3201 | sphere(): void;
|
3202 | }
|
3203 | interface GeoProjection {
|
3204 | project(point: number[]): number[];
|
3205 | unproject(point: number[]): number[];
|
3206 | |
3207 |
|
3208 |
|
3209 |
|
3210 |
|
3211 |
|
3212 |
|
3213 |
|
3214 | stream?(outStream: ProjectionStream): ProjectionStream;
|
3215 | }
|
3216 |
|
3217 | declare abstract class Region {
|
3218 | readonly name: string;
|
3219 | readonly type: 'geoJSON' | 'geoSVG';
|
3220 | protected _center: number[];
|
3221 | protected _rect: BoundingRect;
|
3222 | constructor(name: string);
|
3223 | setCenter(center: number[]): void;
|
3224 | /**
|
3225 | * Get center point in data unit. That is,
|
3226 | * for GeoJSONRegion, the unit is lat/lng,
|
3227 | * for GeoSVGRegion, the unit is SVG local coord.
|
3228 | */
|
3229 | getCenter(): number[];
|
3230 | abstract calcCenter(): number[];
|
3231 | }
|
3232 | declare class GeoJSONPolygonGeometry {
|
3233 | readonly type = "polygon";
|
3234 | exterior: number[][];
|
3235 | interiors?: number[][][];
|
3236 | constructor(exterior: number[][], interiors: number[][][]);
|
3237 | }
|
3238 | declare class GeoJSONLineStringGeometry {
|
3239 | readonly type = "linestring";
|
3240 | points: number[][][];
|
3241 | constructor(points: number[][][]);
|
3242 | }
|
3243 | declare class GeoJSONRegion extends Region {
|
3244 | readonly type = "geoJSON";
|
3245 | readonly geometries: (GeoJSONPolygonGeometry | GeoJSONLineStringGeometry)[];
|
3246 | properties: GeoJSON['features'][0]['properties'];
|
3247 | constructor(name: string, geometries: GeoJSONRegion['geometries'], cp: GeoJSON['features'][0]['properties']['cp']);
|
3248 | calcCenter(): number[];
|
3249 | getBoundingRect(projection?: GeoProjection): BoundingRect;
|
3250 | contain(coord: number[]): boolean;
|
3251 | /**
|
3252 | * Transform the raw coords to target bounding.
|
3253 | * @param x
|
3254 | * @param y
|
3255 | * @param width
|
3256 | * @param height
|
3257 | */
|
3258 | transformTo(x: number, y: number, width: number, height: number): void;
|
3259 | cloneShallow(name: string): GeoJSONRegion;
|
3260 | }
|
3261 |
|
3262 | declare type ECSymbol = Path & {
|
3263 | __isEmptyBrush?: boolean;
|
3264 | setColor: (color: ZRColor, innerColor?: ZRColor) => void;
|
3265 | getColor: () => ZRColor;
|
3266 | };
|
3267 |
|
3268 |
|
3269 |
|
3270 | declare function createSymbol(symbolType: string, x: number, y: number, w: number, h: number, color?: ZRColor, keepAspect?: boolean): ECSymbol;
|
3271 |
|
3272 | declare type ItemStyleKeys = 'fill' | 'stroke' | 'decal' | 'lineWidth' | 'opacity' | 'shadowBlur' | 'shadowOffsetX' | 'shadowOffsetY' | 'shadowColor' | 'lineDash' | 'lineDashOffset' | 'lineCap' | 'lineJoin' | 'miterLimit';
|
3273 | declare type ItemStyleProps = Pick<PathStyleProps, ItemStyleKeys>;
|
3274 | declare class ItemStyleMixin {
|
3275 | getItemStyle(this: Model, excludes?: readonly (keyof ItemStyleOption)[], includes?: readonly (keyof ItemStyleOption)[]): ItemStyleProps;
|
3276 | }
|
3277 |
|
3278 | declare type LineStyleKeys = 'lineWidth' | 'stroke' | 'opacity' | 'shadowBlur' | 'shadowOffsetX' | 'shadowOffsetY' | 'shadowColor' | 'lineDash' | 'lineDashOffset' | 'lineCap' | 'lineJoin' | 'miterLimit';
|
3279 | declare type LineStyleProps = Pick<PathStyleProps, LineStyleKeys>;
|
3280 | declare class LineStyleMixin {
|
3281 | getLineStyle(this: Model, excludes?: readonly (keyof LineStyleOption)[]): LineStyleProps;
|
3282 | }
|
3283 |
|
3284 | declare type SelectorType = 'all' | 'inverse';
|
3285 | interface LegendSelectorButtonOption {
|
3286 | type?: SelectorType;
|
3287 | title?: string;
|
3288 | }
|
3289 |
|
3290 |
|
3291 |
|
3292 |
|
3293 |
|
3294 | declare type ExtendPropertyType<T, ET, ST extends {
|
3295 | [key in keyof T]: any;
|
3296 | }> = {
|
3297 | [key in keyof T]: key extends keyof ST ? T[key] | ET | ST[key] : T[key] | ET;
|
3298 | };
|
3299 | interface LegendItemStyleOption extends ExtendPropertyType<ItemStyleOption, 'inherit', {
|
3300 | borderWidth: 'auto';
|
3301 | }> {
|
3302 | }
|
3303 | interface LegendLineStyleOption extends ExtendPropertyType<LineStyleOption, 'inherit', {
|
3304 | width: 'auto';
|
3305 | }> {
|
3306 | inactiveColor?: ColorString;
|
3307 | inactiveWidth?: number;
|
3308 | }
|
3309 | interface LegendStyleOption {
|
3310 | |
3311 |
|
3312 |
|
3313 |
|
3314 | icon?: string;
|
3315 | |
3316 |
|
3317 |
|
3318 | inactiveColor?: ColorString;
|
3319 | |
3320 |
|
3321 |
|
3322 | inactiveBorderColor?: ColorString;
|
3323 | |
3324 |
|
3325 |
|
3326 | inactiveBorderWidth?: number | 'auto';
|
3327 | |
3328 |
|
3329 |
|
3330 | formatter?: string | ((name: string) => string);
|
3331 | itemStyle?: LegendItemStyleOption;
|
3332 | lineStyle?: LegendLineStyleOption;
|
3333 | textStyle?: LabelOption;
|
3334 | symbolRotate?: number | 'inherit';
|
3335 | /**
|
3336 | * @deprecated
|
3337 | */
|
3338 | symbolKeepAspect?: boolean;
|
3339 | }
|
3340 | interface DataItem extends LegendStyleOption {
|
3341 | name?: string;
|
3342 | icon?: string;
|
3343 | textStyle?: LabelOption;
|
3344 | tooltip?: unknown;
|
3345 | }
|
3346 | interface LegendTooltipFormatterParams {
|
3347 | componentType: 'legend';
|
3348 | legendIndex: number;
|
3349 | name: string;
|
3350 | $vars: ['name'];
|
3351 | }
|
3352 | interface LegendIconParams {
|
3353 | itemWidth: number;
|
3354 | itemHeight: number;
|
3355 | /**
|
3356 | * symbolType is from legend.icon, legend.data.icon, or series visual
|
3357 | */
|
3358 | icon: string;
|
3359 | iconRotate: number | 'inherit';
|
3360 | symbolKeepAspect: boolean;
|
3361 | itemStyle: PathStyleProps;
|
3362 | lineStyle: LineStyleProps;
|
3363 | }
|
3364 | interface LegendOption extends ComponentOption, LegendStyleOption, BoxLayoutOptionMixin, BorderOptionMixin {
|
3365 | mainType?: 'legend';
|
3366 | show?: boolean;
|
3367 | orient?: LayoutOrient;
|
3368 | align?: 'auto' | 'left' | 'right';
|
3369 | backgroundColor?: ColorString;
|
3370 | /**
|
3371 | * Border radius of background rect
|
3372 | * @default 0
|
3373 | */
|
3374 | borderRadius?: number | number[];
|
3375 | /**
|
3376 | * Padding between legend item and border.
|
3377 | * Support to be a single number or an array.
|
3378 | * @default 5
|
3379 | */
|
3380 | padding?: number | number[];
|
3381 | /**
|
3382 | * Gap between each legend item.
|
3383 | * @default 10
|
3384 | */
|
3385 | itemGap?: number;
|
3386 | /**
|
3387 | * Width of legend symbol
|
3388 | */
|
3389 | itemWidth?: number;
|
3390 | /**
|
3391 | * Height of legend symbol
|
3392 | */
|
3393 | itemHeight?: number;
|
3394 | selectedMode?: boolean | 'single' | 'multiple';
|
3395 | /**
|
3396 | * selected map of each item. Default to be selected if item is not in the map
|
3397 | */
|
3398 | selected?: Dictionary<boolean>;
|
3399 | /**
|
3400 | * Buttons for all select or inverse select.
|
3401 | * @example
|
3402 | * selector: [{type: 'all or inverse', title: xxx}]
|
3403 | * selector: true
|
3404 | * selector: ['all', 'inverse']
|
3405 | */
|
3406 | selector?: (LegendSelectorButtonOption | SelectorType)[] | boolean;
|
3407 | selectorLabel?: LabelOption;
|
3408 | emphasis?: {
|
3409 | selectorLabel?: LabelOption;
|
3410 | };
|
3411 | /**
|
3412 | * Position of selector buttons.
|
3413 | */
|
3414 | selectorPosition?: 'auto' | 'start' | 'end';
|
3415 | /**
|
3416 | * Gap between each selector button
|
3417 | */
|
3418 | selectorItemGap?: number;
|
3419 | /**
|
3420 | * Gap between selector buttons group and legend main items.
|
3421 | */
|
3422 | selectorButtonGap?: number;
|
3423 | data?: (string | DataItem)[];
|
3424 | /**
|
3425 | * Tooltip option
|
3426 | */
|
3427 | tooltip?: CommonTooltipOption<LegendTooltipFormatterParams>;
|
3428 | }
|
3429 |
|
3430 | interface MapStateOption<TCbParams = never> {
|
3431 | itemStyle?: GeoItemStyleOption<TCbParams>;
|
3432 | label?: SeriesLabelOption;
|
3433 | }
|
3434 | interface MapDataItemOption extends MapStateOption, StatesOptionMixin<MapStateOption, StatesMixinBase>, OptionDataItemObject<OptionDataValueNumeric> {
|
3435 | cursor?: string;
|
3436 | }
|
3437 | declare type MapValueCalculationType = 'sum' | 'average' | 'min' | 'max';
|
3438 | interface MapSeriesOption extends SeriesOption<MapStateOption<CallbackDataParams>, StatesMixinBase>, MapStateOption<CallbackDataParams>, GeoCommonOptionMixin, SeriesOnGeoOptionMixin, BoxLayoutOptionMixin, SeriesEncodeOptionMixin {
|
3439 | type?: 'map';
|
3440 | coordinateSystem?: string;
|
3441 | silent?: boolean;
|
3442 | markLine?: any;
|
3443 | markPoint?: any;
|
3444 | markArea?: any;
|
3445 | mapValueCalculation?: MapValueCalculationType;
|
3446 | showLegendSymbol?: boolean;
|
3447 | geoCoord?: Dictionary<number[]>;
|
3448 | data?: (OptionDataValueNumeric | OptionDataValueNumeric[] | MapDataItemOption)[];
|
3449 | nameProperty?: string;
|
3450 | }
|
3451 |
|
3452 | interface GeoItemStyleOption<TCbParams = never> extends ItemStyleOption<TCbParams> {
|
3453 | areaColor?: ZRColor;
|
3454 | }
|
3455 | interface GeoLabelOption extends LabelOption {
|
3456 | formatter?: string | ((params: GeoLabelFormatterDataParams) => string);
|
3457 | }
|
3458 | interface GeoStateOption {
|
3459 | itemStyle?: GeoItemStyleOption;
|
3460 | label?: GeoLabelOption;
|
3461 | }
|
3462 | interface GeoLabelFormatterDataParams {
|
3463 | name: string;
|
3464 | status: DisplayState;
|
3465 | }
|
3466 | interface RegoinOption extends GeoStateOption, StatesOptionMixin<GeoStateOption, StatesMixinBase> {
|
3467 | name?: string;
|
3468 | selected?: boolean;
|
3469 | tooltip?: CommonTooltipOption<GeoTooltipFormatterParams>;
|
3470 | }
|
3471 | interface GeoTooltipFormatterParams {
|
3472 | componentType: 'geo';
|
3473 | geoIndex: number;
|
3474 | name: string;
|
3475 | $vars: ['name'];
|
3476 | }
|
3477 | interface GeoCommonOptionMixin extends RoamOptionMixin {
|
3478 | map: string;
|
3479 | aspectScale?: number;
|
3480 | layoutCenter?: (number | string)[];
|
3481 | layoutSize?: number | string;
|
3482 | boundingCoords?: number[][];
|
3483 | nameMap?: NameMap;
|
3484 | nameProperty?: string;
|
3485 | /**
|
3486 | * Use raw projection by default
|
3487 | * Only available for GeoJSON source.
|
3488 | *
|
3489 | * NOTE: `center` needs to be the projected coord if projection is used.
|
3490 | */
|
3491 | projection?: GeoProjection;
|
3492 | }
|
3493 | interface GeoOption extends ComponentOption, BoxLayoutOptionMixin, AnimationOptionMixin, GeoCommonOptionMixin, StatesOptionMixin<GeoStateOption, StatesMixinBase>, GeoStateOption {
|
3494 | mainType?: 'geo';
|
3495 | show?: boolean;
|
3496 | silent?: boolean;
|
3497 | regions?: RegoinOption[];
|
3498 | stateAnimation?: AnimationOptionMixin;
|
3499 | selectedMode?: 'single' | 'multiple' | boolean;
|
3500 | selectedMap?: Dictionary<boolean>;
|
3501 | tooltip?: CommonTooltipOption<GeoTooltipFormatterParams>;
|
3502 | }
|
3503 |
|
3504 | /**
|
3505 | * The input to define brush areas.
|
3506 | * (1) Can be created by user when calling dispatchAction.
|
3507 | * (2) Can be created by `BrushController`
|
3508 | * for brush behavior. area params are picked from `cover.__brushOptoin`.
|
3509 | * In `BrushController`, "covers" are create or updated for each "area".
|
3510 | */
|
3511 | interface BrushAreaParam extends ModelFinderObject {
|
3512 | brushType: BrushCoverConfig['brushType'];
|
3513 | id?: BrushCoverConfig['id'];
|
3514 | range?: BrushCoverConfig['range'];
|
3515 | panelId?: BrushCoverConfig['panelId'];
|
3516 | coordRange?: BrushAreaRange;
|
3517 | coordRanges?: BrushAreaRange[];
|
3518 | __rangeOffset?: {
|
3519 | offset: BrushDimensionMinMax[] | BrushDimensionMinMax;
|
3520 | xyMinMax: BrushDimensionMinMax[];
|
3521 | };
|
3522 | }
|
3523 | /**
|
3524 | * Generated by `brushModel.setAreas`, which merges
|
3525 | * `area: BrushAreaParam` and `brushModel.option: BrushOption`.
|
3526 | * See `generateBrushOption`.
|
3527 | */
|
3528 | interface BrushAreaParamInternal extends BrushAreaParam {
|
3529 | brushMode: BrushMode;
|
3530 | brushStyle: BrushCoverConfig['brushStyle'];
|
3531 | transformable: BrushCoverConfig['transformable'];
|
3532 | removeOnClick: BrushCoverConfig['removeOnClick'];
|
3533 | z: BrushCoverConfig['z'];
|
3534 | __rangeOffset?: {
|
3535 | offset: BrushDimensionMinMax | BrushDimensionMinMax[];
|
3536 | xyMinMax: BrushDimensionMinMax[];
|
3537 | };
|
3538 | }
|
3539 | declare type BrushToolboxIconType = BrushType | 'keep' | 'clear';
|
3540 | interface BrushOption extends ComponentOption, ModelFinderObject {
|
3541 | mainType?: 'brush';
|
3542 | toolbox?: BrushToolboxIconType[];
|
3543 | brushLink?: number[] | 'all' | 'none';
|
3544 | throttleType?: 'fixRate' | 'debounce';
|
3545 | throttleDelay?: number;
|
3546 | inBrush?: VisualOptionFixed;
|
3547 | outOfBrush?: VisualOptionFixed;
|
3548 | brushType?: BrushTypeUncertain;
|
3549 | brushStyle?: {
|
3550 | borderWidth?: number;
|
3551 | color?: ZRColor;
|
3552 | borderColor?: ZRColor;
|
3553 | };
|
3554 | transformable?: boolean;
|
3555 | brushMode?: BrushMode;
|
3556 | removeOnClick?: boolean;
|
3557 | }
|
3558 |
|
3559 | interface BrushSelectableArea extends BrushAreaParamInternal {
|
3560 | boundingRect: BoundingRect;
|
3561 | selectors: BrushCommonSelectorsForSeries;
|
3562 | }
|
3563 | /**
|
3564 | * This methods are corresponding to `BrushSelectorOnBrushType`,
|
3565 | * but `area: BrushSelectableArea` is binded to each method.
|
3566 | */
|
3567 | interface BrushCommonSelectorsForSeries {
|
3568 | point(itemLayout: number[]): boolean;
|
3569 | rect(itemLayout: RectLike): boolean;
|
3570 | }
|
3571 |
|
3572 | declare type PolarBarLabelPosition = SeriesLabelOption['position'] | 'start' | 'insideStart' | 'middle' | 'end' | 'insideEnd';
|
3573 | declare type BarSeriesLabelOption = Omit<SeriesLabelOption, 'position'> & {
|
3574 | position?: PolarBarLabelPosition | 'outside';
|
3575 | };
|
3576 | interface BarStateOption<TCbParams = never> {
|
3577 | itemStyle?: BarItemStyleOption<TCbParams>;
|
3578 | label?: BarSeriesLabelOption;
|
3579 | }
|
3580 | interface BarStatesMixin {
|
3581 | emphasis?: DefaultStatesMixinEmphasis;
|
3582 | }
|
3583 | interface BarItemStyleOption<TCbParams = never> extends ItemStyleOption<TCbParams> {
|
3584 | borderRadius?: (number | string)[] | number | string;
|
3585 | }
|
3586 | interface BarDataItemOption extends BarStateOption, StatesOptionMixin<BarStateOption, BarStatesMixin>, OptionDataItemObject<OptionDataValue> {
|
3587 | cursor?: string;
|
3588 | }
|
3589 | interface BarSeriesOption extends BaseBarSeriesOption<BarStateOption<CallbackDataParams>, BarStatesMixin>, BarStateOption<CallbackDataParams>, SeriesStackOptionMixin, SeriesSamplingOptionMixin, SeriesEncodeOptionMixin {
|
3590 | type?: 'bar';
|
3591 | coordinateSystem?: 'cartesian2d' | 'polar';
|
3592 | clip?: boolean;
|
3593 | /**
|
3594 | * If use caps on two sides of bars
|
3595 | * Only available on tangential polar bar
|
3596 | */
|
3597 | roundCap?: boolean;
|
3598 | showBackground?: boolean;
|
3599 | startValue?: number;
|
3600 | backgroundStyle?: ItemStyleOption & {
|
3601 | borderRadius?: number | number[];
|
3602 | };
|
3603 | data?: (BarDataItemOption | OptionDataValue | OptionDataValue[])[];
|
3604 | realtimeSort?: boolean;
|
3605 | }
|
3606 |
|
3607 | /**
|
3608 | * {
|
3609 | * [coordSysId]: {
|
3610 | * [stackId]: {bandWidth, offset, width}
|
3611 | * }
|
3612 | * }
|
3613 | */
|
3614 | declare type BarWidthAndOffset = Dictionary<Dictionary<{
|
3615 | bandWidth: number;
|
3616 | offset: number;
|
3617 | offsetCenter: number;
|
3618 | width: number;
|
3619 | }>>;
|
3620 | interface BarGridLayoutOptionForCustomSeries {
|
3621 | count: number;
|
3622 | barWidth?: number | string;
|
3623 | barMaxWidth?: number | string;
|
3624 | barMinWidth?: number | string;
|
3625 | barGap?: number | string;
|
3626 | barCategoryGap?: number | string;
|
3627 | }
|
3628 | declare type BarGridLayoutResult = BarWidthAndOffset[string][string][];
|
3629 |
|
3630 | interface TransitionOptionMixin<T = Record<string, any>> {
|
3631 | transition?: (keyof T & string) | ((keyof T & string)[]) | 'all';
|
3632 | enterFrom?: T;
|
3633 | leaveTo?: T;
|
3634 | enterAnimation?: AnimationOption$1;
|
3635 | updateAnimation?: AnimationOption$1;
|
3636 | leaveAnimation?: AnimationOption$1;
|
3637 | }
|
3638 | interface TransitionBaseDuringAPI {
|
3639 | setTransform(key: TransformProp, val: number): this;
|
3640 | getTransform(key: TransformProp): number;
|
3641 | setExtra(key: string, val: unknown): this;
|
3642 | getExtra(key: string): unknown;
|
3643 | }
|
3644 | interface TransitionDuringAPI<StyleOpt extends any = any, ShapeOpt extends any = any> extends TransitionBaseDuringAPI {
|
3645 | setShape<T extends keyof ShapeOpt>(key: T, val: ShapeOpt[T]): this;
|
3646 | getShape<T extends keyof ShapeOpt>(key: T): ShapeOpt[T];
|
3647 | setStyle<T extends keyof StyleOpt>(key: T, val: StyleOpt[T]): this;
|
3648 | getStyle<T extends keyof StyleOpt>(key: T): StyleOpt[T];
|
3649 | }
|
3650 |
|
3651 | declare type AnimationKeyframe<T extends Record<string, any>> = T & {
|
3652 | easing?: AnimationEasing;
|
3653 | percent?: number;
|
3654 | };
|
3655 | interface ElementKeyframeAnimationOption<Props extends Record<string, any>> extends AnimationOption$1 {
|
3656 | loop?: boolean;
|
3657 | keyframes?: AnimationKeyframe<Props>[];
|
3658 | }
|
3659 |
|
3660 | declare type CustomExtraElementInfo = Dictionary<unknown>;
|
3661 | declare const STYLE_VISUAL_TYPE: {
|
3662 | readonly color: "fill";
|
3663 | readonly borderColor: "stroke";
|
3664 | };
|
3665 | declare type StyleVisualProps = keyof typeof STYLE_VISUAL_TYPE;
|
3666 | declare const NON_STYLE_VISUAL_PROPS: {
|
3667 | readonly symbol: 1;
|
3668 | readonly symbolSize: 1;
|
3669 | readonly symbolKeepAspect: 1;
|
3670 | readonly legendIcon: 1;
|
3671 | readonly visualMeta: 1;
|
3672 | readonly liftZ: 1;
|
3673 | readonly decal: 1;
|
3674 | };
|
3675 | declare type NonStyleVisualProps = keyof typeof NON_STYLE_VISUAL_PROPS;
|
3676 | declare type ShapeMorphingOption = {
|
3677 | /**
|
3678 | * If do shape morphing animation when type is changed.
|
3679 | * Only available on path.
|
3680 | */
|
3681 | morph?: boolean;
|
3682 | };
|
3683 | interface CustomBaseElementOption extends Partial<Pick<Element, TransformProp | 'silent' | 'ignore' | 'textConfig'>> {
|
3684 | type: string;
|
3685 | id?: string;
|
3686 | name?: string;
|
3687 | info?: CustomExtraElementInfo;
|
3688 | textContent?: CustomTextOption | false;
|
3689 | clipPath?: CustomBaseZRPathOption | false;
|
3690 | extra?: Dictionary<unknown> & TransitionOptionMixin;
|
3691 | during?(params: TransitionBaseDuringAPI): void;
|
3692 | enterAnimation?: AnimationOption$1;
|
3693 | updateAnimation?: AnimationOption$1;
|
3694 | leaveAnimation?: AnimationOption$1;
|
3695 | }
|
3696 | interface CustomDisplayableOption extends CustomBaseElementOption, Partial<Pick<Displayable, 'zlevel' | 'z' | 'z2' | 'invisible'>> {
|
3697 | style?: ZRStyleProps;
|
3698 | during?(params: TransitionDuringAPI): void;
|
3699 | /**
|
3700 | * @deprecated
|
3701 | */
|
3702 | styleEmphasis?: ZRStyleProps | false;
|
3703 | emphasis?: CustomDisplayableOptionOnState;
|
3704 | blur?: CustomDisplayableOptionOnState;
|
3705 | select?: CustomDisplayableOptionOnState;
|
3706 | }
|
3707 | interface CustomDisplayableOptionOnState extends Partial<Pick<Displayable, TransformProp | 'textConfig' | 'z2'>> {
|
3708 | style?: ZRStyleProps | false;
|
3709 | }
|
3710 | interface CustomGroupOption extends CustomBaseElementOption, TransitionOptionMixin<GroupProps> {
|
3711 | type: 'group';
|
3712 | width?: number;
|
3713 | height?: number;
|
3714 | diffChildrenByName?: boolean;
|
3715 | children: CustomElementOption[];
|
3716 | $mergeChildren?: false | 'byName' | 'byIndex';
|
3717 | keyframeAnimation?: ElementKeyframeAnimationOption<GroupProps> | ElementKeyframeAnimationOption<GroupProps>[];
|
3718 | }
|
3719 | interface CustomBaseZRPathOption<T extends PathProps['shape'] = PathProps['shape']> extends CustomDisplayableOption, ShapeMorphingOption, TransitionOptionMixin<PathProps & {
|
3720 | shape: T;
|
3721 | }> {
|
3722 | autoBatch?: boolean;
|
3723 | shape?: T & TransitionOptionMixin<T>;
|
3724 | style?: PathProps['style'] & TransitionOptionMixin<PathStyleProps>;
|
3725 | during?(params: TransitionDuringAPI<PathStyleProps, T>): void;
|
3726 | keyframeAnimation?: ElementKeyframeAnimationOption<PathProps & {
|
3727 | shape: T;
|
3728 | }> | ElementKeyframeAnimationOption<PathProps & {
|
3729 | shape: T;
|
3730 | }>[];
|
3731 | }
|
3732 | interface BuiltinShapes {
|
3733 | circle: Partial<Circle['shape']>;
|
3734 | rect: Partial<Rect['shape']>;
|
3735 | sector: Partial<Sector['shape']>;
|
3736 | polygon: Partial<Polygon['shape']>;
|
3737 | polyline: Partial<Polyline['shape']>;
|
3738 | line: Partial<Line['shape']>;
|
3739 | arc: Partial<Arc['shape']>;
|
3740 | bezierCurve: Partial<BezierCurve['shape']>;
|
3741 | ring: Partial<Ring['shape']>;
|
3742 | ellipse: Partial<Ellipse['shape']>;
|
3743 | compoundPath: Partial<CompoundPath['shape']>;
|
3744 | }
|
3745 | interface CustomSVGPathShapeOption {
|
3746 | pathData?: string;
|
3747 | d?: string;
|
3748 | layout?: 'center' | 'cover';
|
3749 | x?: number;
|
3750 | y?: number;
|
3751 | width?: number;
|
3752 | height?: number;
|
3753 | }
|
3754 | interface CustomSVGPathOption extends CustomBaseZRPathOption<CustomSVGPathShapeOption> {
|
3755 | type: 'path';
|
3756 | }
|
3757 | interface CustomBuitinPathOption<T extends keyof BuiltinShapes> extends CustomBaseZRPathOption<BuiltinShapes[T]> {
|
3758 | type: T;
|
3759 | }
|
3760 | declare type CreateCustomBuitinPathOption<T extends keyof BuiltinShapes> = T extends any ? CustomBuitinPathOption<T> : never;
|
3761 | declare type CustomPathOption = CreateCustomBuitinPathOption<keyof BuiltinShapes> | CustomSVGPathOption;
|
3762 | interface CustomImageOptionOnState extends CustomDisplayableOptionOnState {
|
3763 | style?: ImageStyleProps;
|
3764 | }
|
3765 | interface CustomImageOption extends CustomDisplayableOption, TransitionOptionMixin<ImageProps> {
|
3766 | type: 'image';
|
3767 | style?: ImageStyleProps & TransitionOptionMixin<ImageStyleProps>;
|
3768 | emphasis?: CustomImageOptionOnState;
|
3769 | blur?: CustomImageOptionOnState;
|
3770 | select?: CustomImageOptionOnState;
|
3771 | keyframeAnimation?: ElementKeyframeAnimationOption<ImageProps> | ElementKeyframeAnimationOption<ImageProps>[];
|
3772 | }
|
3773 | interface CustomTextOptionOnState extends CustomDisplayableOptionOnState {
|
3774 | style?: TextStyleProps;
|
3775 | }
|
3776 | interface CustomTextOption extends CustomDisplayableOption, TransitionOptionMixin<TextProps> {
|
3777 | type: 'text';
|
3778 | style?: TextStyleProps & TransitionOptionMixin<TextStyleProps>;
|
3779 | emphasis?: CustomTextOptionOnState;
|
3780 | blur?: CustomTextOptionOnState;
|
3781 | select?: CustomTextOptionOnState;
|
3782 | keyframeAnimation?: ElementKeyframeAnimationOption<TextProps> | ElementKeyframeAnimationOption<TextProps>[];
|
3783 | }
|
3784 | declare type CustomElementOption = CustomPathOption | CustomImageOption | CustomTextOption | CustomGroupOption;
|
3785 | declare type CustomRootElementOption = CustomElementOption & {
|
3786 | focus?: 'none' | 'self' | 'series' | ArrayLike<number>;
|
3787 | blurScope?: BlurScope;
|
3788 | emphasisDisabled?: boolean;
|
3789 | };
|
3790 | interface CustomSeriesRenderItemAPI extends CustomSeriesRenderItemCoordinateSystemAPI {
|
3791 | getWidth(): number;
|
3792 | getHeight(): number;
|
3793 | getZr(): ZRenderType;
|
3794 | getDevicePixelRatio(): number;
|
3795 | value(dim: DimensionLoose, dataIndexInside?: number): ParsedValue;
|
3796 | ordinalRawValue(dim: DimensionLoose, dataIndexInside?: number): ParsedValue | OrdinalRawValue;
|
3797 | /**
|
3798 | * @deprecated
|
3799 | */
|
3800 | style(userProps?: ZRStyleProps, dataIndexInside?: number): ZRStyleProps;
|
3801 | /**
|
3802 | * @deprecated
|
3803 | */
|
3804 | styleEmphasis(userProps?: ZRStyleProps, dataIndexInside?: number): ZRStyleProps;
|
3805 | visual<VT extends NonStyleVisualProps | StyleVisualProps>(visualType: VT, dataIndexInside?: number): VT extends NonStyleVisualProps ? DefaultDataVisual[VT] : VT extends StyleVisualProps ? PathStyleProps[typeof STYLE_VISUAL_TYPE[VT]] : void;
|
3806 | barLayout(opt: BarGridLayoutOptionForCustomSeries): BarGridLayoutResult;
|
3807 | currentSeriesIndices(): number[];
|
3808 | font(opt: Pick<TextCommonOption, 'fontStyle' | 'fontWeight' | 'fontSize' | 'fontFamily'>): string;
|
3809 | }
|
3810 | interface CustomSeriesRenderItemParamsCoordSys {
|
3811 | type: string;
|
3812 | }
|
3813 | interface CustomSeriesRenderItemCoordinateSystemAPI {
|
3814 | coord(data: OptionDataValue | OptionDataValue[], clamp?: boolean): number[];
|
3815 | size?(dataSize: OptionDataValue | OptionDataValue[], dataItem?: OptionDataValue | OptionDataValue[]): number | number[];
|
3816 | }
|
3817 | declare type WrapEncodeDefRet = Dictionary<number[]>;
|
3818 | interface CustomSeriesRenderItemParams {
|
3819 | context: Dictionary<unknown>;
|
3820 | dataIndex: number;
|
3821 | seriesId: string;
|
3822 | seriesName: string;
|
3823 | seriesIndex: number;
|
3824 | coordSys: CustomSeriesRenderItemParamsCoordSys;
|
3825 | encode: WrapEncodeDefRet;
|
3826 | dataIndexInside: number;
|
3827 | dataInsideLength: number;
|
3828 | actionType?: string;
|
3829 | }
|
3830 | declare type CustomSeriesRenderItemReturn = CustomRootElementOption | undefined | null;
|
3831 | declare type CustomSeriesRenderItem = (params: CustomSeriesRenderItemParams, api: CustomSeriesRenderItemAPI) => CustomSeriesRenderItemReturn;
|
3832 | interface CustomSeriesOption extends SeriesOption<unknown>, // don't support StateOption in custom series.
|
3833 | SeriesEncodeOptionMixin, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnSingleOptionMixin, SeriesOnGeoOptionMixin, SeriesOnCalendarOptionMixin {
|
3834 | type?: 'custom';
|
3835 | coordinateSystem?: string | 'none';
|
3836 | renderItem?: CustomSeriesRenderItem;
|
3837 | |
3838 |
|
3839 |
|
3840 | itemStyle?: ItemStyleOption;
|
3841 | |
3842 |
|
3843 |
|
3844 | label?: LabelOption;
|
3845 | |
3846 |
|
3847 |
|
3848 | emphasis?: {
|
3849 | |
3850 |
|
3851 |
|
3852 | itemStyle?: ItemStyleOption;
|
3853 | |
3854 |
|
3855 |
|
3856 | label?: LabelOption;
|
3857 | };
|
3858 | clip?: boolean;
|
3859 | }
|
3860 | declare type PrepareCustomInfo = (coordSys: CoordinateSystem) => {
|
3861 | coordSys: CustomSeriesRenderItemParamsCoordSys;
|
3862 | api: CustomSeriesRenderItemCoordinateSystemAPI;
|
3863 | };
|
3864 |
|
3865 | interface CoordinateSystemCreator {
|
3866 | create: (ecModel: GlobalModel, api: ExtensionAPI) => CoordinateSystemMaster[];
|
3867 | dimensions?: DimensionName[];
|
3868 | getDimensionsInfo?: () => DimensionDefinitionLoose[];
|
3869 | }
|
3870 |
|
3871 |
|
3872 |
|
3873 | interface CoordinateSystemMaster {
|
3874 | dimensions: DimensionName[];
|
3875 | model?: ComponentModel;
|
3876 | update?: (ecModel: GlobalModel, api: ExtensionAPI) => void;
|
3877 | convertToPixel?(ecModel: GlobalModel, finder: ParsedModelFinder, value: ScaleDataValue | ScaleDataValue[]): number | number[];
|
3878 | convertFromPixel?(ecModel: GlobalModel, finder: ParsedModelFinder, pixelValue: number | number[]): number | number[];
|
3879 | containPoint(point: number[]): boolean;
|
3880 | getAxes?: () => Axis[];
|
3881 | axisPointerEnabled?: boolean;
|
3882 | getTooltipAxes?: (dim: DimensionName | 'auto') => {
|
3883 | baseAxes: Axis[];
|
3884 | otherAxes: Axis[];
|
3885 | };
|
3886 | |
3887 |
|
3888 |
|
3889 | getRect?: () => RectLike;
|
3890 | }
|
3891 |
|
3892 |
|
3893 |
|
3894 |
|
3895 | interface CoordinateSystem {
|
3896 | type: string;
|
3897 | |
3898 |
|
3899 |
|
3900 |
|
3901 | master?: CoordinateSystemMaster;
|
3902 | dimensions: DimensionName[];
|
3903 | model?: ComponentModel;
|
3904 | |
3905 |
|
3906 |
|
3907 |
|
3908 |
|
3909 |
|
3910 | dataToPoint(data: ScaleDataValue | ScaleDataValue[], reserved?: any, out?: number[]): number[];
|
3911 | |
3912 |
|
3913 |
|
3914 |
|
3915 |
|
3916 |
|
3917 |
|
3918 | pointToData?(point: number[], clamp?: boolean): number | number[];
|
3919 | containPoint(point: number[]): boolean;
|
3920 | getAxes?: () => Axis[];
|
3921 | getAxis?: (dim?: DimensionName) => Axis;
|
3922 | getBaseAxis?: () => Axis;
|
3923 | getOtherAxis?: (baseAxis: Axis) => Axis;
|
3924 | clampData?: (data: ScaleDataValue[], out?: number[]) => number[];
|
3925 | getRoamTransform?: () => MatrixArray;
|
3926 | getArea?: (tolerance?: number) => CoordinateSystemClipArea;
|
3927 | getBoundingRect?: () => BoundingRect;
|
3928 | getAxesByScale?: (scaleType: string) => Axis[];
|
3929 | prepareCustoms?: PrepareCustomInfo;
|
3930 | }
|
3931 |
|
3932 |
|
3933 |
|
3934 | interface CoordinateSystemHostModel extends ComponentModel {
|
3935 | coordinateSystem?: CoordinateSystemMaster;
|
3936 | }
|
3937 |
|
3938 |
|
3939 |
|
3940 |
|
3941 | interface CoordinateSystemClipArea {
|
3942 | contain(x: number, y: number): boolean;
|
3943 | }
|
3944 |
|
3945 |
|
3946 |
|
3947 |
|
3948 |
|
3949 | declare class LegendVisualProvider {
|
3950 | private _getDataWithEncodedVisual;
|
3951 | private _getRawData;
|
3952 | constructor(getDataWithEncodedVisual: () => SeriesData, getRawData: () => SeriesData);
|
3953 | getAllNames(): string[];
|
3954 | containName(name: string): boolean;
|
3955 | indexOfName(name: string): number;
|
3956 | getItemVisual(dataIndex: number, key: string): any;
|
3957 | }
|
3958 |
|
3959 | declare function makeStyleMapper(properties: readonly string[][], ignoreParent?: boolean): (model: Model, excludes?: readonly string[], includes?: readonly string[]) => PathStyleProps;
|
3960 |
|
3961 | declare const SERIES_UNIVERSAL_TRANSITION_PROP = "__universalTransitionEnabled";
|
3962 | interface SeriesModel {
|
3963 | |
3964 |
|
3965 |
|
3966 |
|
3967 | preventIncremental(): boolean;
|
3968 | |
3969 |
|
3970 |
|
3971 |
|
3972 |
|
3973 | getTooltipPosition(dataIndex: number): number[];
|
3974 | |
3975 |
|
3976 |
|
3977 |
|
3978 | getAxisTooltipData(dim: DimensionName[], value: ScaleDataValue, baseAxis: Axis): {
|
3979 | dataIndices: number[];
|
3980 | nestestValue: any;
|
3981 | };
|
3982 | |
3983 |
|
3984 |
|
3985 | getMarkerPosition(value: ScaleDataValue[], dims?: typeof dimPermutations[number], startingAtTick?: boolean): number[];
|
3986 | |
3987 |
|
3988 |
|
3989 | getLegendIcon(opt: LegendIconParams): ECSymbol | Group;
|
3990 | |
3991 |
|
3992 |
|
3993 |
|
3994 | brushSelector(dataIndex: number, data: SeriesData, selectors: BrushCommonSelectorsForSeries, area: BrushSelectableArea): boolean;
|
3995 | enableAriaDecal(): void;
|
3996 | }
|
3997 | declare class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentModel<Opt> {
|
3998 | type: string;
|
3999 | defaultOption: SeriesOption;
|
4000 | seriesIndex: number;
|
4001 | coordinateSystem: CoordinateSystem;
|
4002 | dataTask: SeriesTask;
|
4003 | pipelineContext: PipelineContext;
|
4004 | legendVisualProvider: LegendVisualProvider;
|
4005 | visualStyleAccessPath: string;
|
4006 | visualDrawType: 'fill' | 'stroke';
|
4007 | visualStyleMapper: ReturnType<typeof makeStyleMapper>;
|
4008 | ignoreStyleOnData: boolean;
|
4009 | hasSymbolVisual: boolean;
|
4010 | defaultSymbol: string;
|
4011 | legendIcon: string;
|
4012 | [SERIES_UNIVERSAL_TRANSITION_PROP]: boolean;
|
4013 | private _selectedDataIndicesMap;
|
4014 | readonly preventUsingHoverLayer: boolean;
|
4015 | static protoInitialize: void;
|
4016 | init(option: Opt, parentModel: Model, ecModel: GlobalModel): void;
|
4017 | |
4018 |
|
4019 |
|
4020 | mergeDefaultAndTheme(option: Opt, ecModel: GlobalModel): void;
|
4021 | mergeOption(newSeriesOption: Opt, ecModel: GlobalModel): void;
|
4022 | fillDataTextStyle(data: ArrayLike<any>): void;
|
4023 | |
4024 |
|
4025 |
|
4026 |
|
4027 | getInitialData(option: Opt, ecModel: GlobalModel): SeriesData;
|
4028 | |
4029 |
|
4030 |
|
4031 | appendData(params: {
|
4032 | data: ArrayLike<any>;
|
4033 | }): void;
|
4034 | |
4035 |
|
4036 |
|
4037 |
|
4038 |
|
4039 |
|
4040 | getData(dataType?: SeriesDataType): SeriesData<this>;
|
4041 | getAllData(): ({
|
4042 | data: SeriesData;
|
4043 | type?: SeriesDataType;
|
4044 | })[];
|
4045 | setData(data: SeriesData): void;
|
4046 | getEncode(): HashMap<OptionEncodeValue, string>;
|
4047 | getSourceManager(): SourceManager;
|
4048 | getSource(): Source;
|
4049 | |
4050 |
|
4051 |
|
4052 | getRawData(): SeriesData;
|
4053 | getColorBy(): ColorBy;
|
4054 | isColorBySeries(): boolean;
|
4055 | |
4056 |
|
4057 |
|
4058 |
|
4059 |
|
4060 |
|
4061 | getBaseAxis(): Axis;
|
4062 | |
4063 |
|
4064 |
|
4065 |
|
4066 |
|
4067 |
|
4068 |
|
4069 |
|
4070 |
|
4071 |
|
4072 |
|
4073 |
|
4074 |
|
4075 |
|
4076 | formatTooltip(dataIndex: number, multipleSeries?: boolean, dataType?: SeriesDataType): ReturnType<DataFormatMixin['formatTooltip']>;
|
4077 | isAnimationEnabled(): boolean;
|
4078 | restoreData(): void;
|
4079 | getColorFromPalette(name: string, scope: any, requestColorNum?: number): ZRColor;
|
4080 | |
4081 |
|
4082 |
|
4083 |
|
4084 | coordDimToDataDim(coordDim: DimensionName): DimensionName[];
|
4085 | |
4086 |
|
4087 |
|
4088 | getProgressive(): number | false;
|
4089 | |
4090 |
|
4091 |
|
4092 | getProgressiveThreshold(): number;
|
4093 | select(innerDataIndices: number[], dataType?: SeriesDataType): void;
|
4094 | unselect(innerDataIndices: number[], dataType?: SeriesDataType): void;
|
4095 | toggleSelect(innerDataIndices: number[], dataType?: SeriesDataType): void;
|
4096 | getSelectedDataIndices(): number[];
|
4097 | isSelected(dataIndex: number, dataType?: SeriesDataType): boolean;
|
4098 | isUniversalTransitionEnabled(): boolean;
|
4099 | private _innerSelect;
|
4100 | private _initSelectedMapFromData;
|
4101 | static registerClass(clz: Constructor): Constructor;
|
4102 | }
|
4103 | interface SeriesModel<Opt extends SeriesOption = SeriesOption> extends DataFormatMixin, PaletteMixin<Opt>, DataHost {
|
4104 | |
4105 |
|
4106 |
|
4107 | getShadowDim?(): string;
|
4108 | }
|
4109 |
|
4110 |
|
4111 |
|
4112 |
|
4113 | declare const dataCtors: {
|
4114 | readonly float: ArrayConstructor | Float64ArrayConstructor;
|
4115 | readonly int: ArrayConstructor | Int32ArrayConstructor;
|
4116 | readonly ordinal: ArrayConstructor;
|
4117 | readonly number: ArrayConstructor;
|
4118 | readonly time: ArrayConstructor | Float64ArrayConstructor;
|
4119 | };
|
4120 | declare type DataStoreDimensionType = keyof typeof dataCtors;
|
4121 | declare type EachCb = (...args: any) => void;
|
4122 | declare type FilterCb = (...args: any) => boolean;
|
4123 | declare type MapCb = (...args: any) => ParsedValue | ParsedValue[];
|
4124 | declare type DimValueGetter = (this: DataStore, dataItem: any, property: string, dataIndex: number, dimIndex: DimensionIndex) => ParsedValue;
|
4125 | interface DataStoreDimensionDefine {
|
4126 | |
4127 |
|
4128 |
|
4129 | type?: DataStoreDimensionType;
|
4130 | |
4131 |
|
4132 |
|
4133 |
|
4134 |
|
4135 |
|
4136 |
|
4137 |
|
4138 |
|
4139 | property?: string;
|
4140 | |
4141 |
|
4142 |
|
4143 |
|
4144 |
|
4145 | ordinalMeta?: OrdinalMeta;
|
4146 | |
4147 |
|
4148 |
|
4149 | ordinalOffset?: number;
|
4150 | }
|
4151 |
|
4152 |
|
4153 |
|
4154 | declare class DataStore {
|
4155 | private _chunks;
|
4156 | private _provider;
|
4157 | private _rawExtent;
|
4158 | private _extent;
|
4159 | private _indices;
|
4160 | private _count;
|
4161 | private _rawCount;
|
4162 | private _dimensions;
|
4163 | private _dimValueGetter;
|
4164 | private _calcDimNameToIdx;
|
4165 | defaultDimValueGetter: DimValueGetter;
|
4166 | |
4167 |
|
4168 |
|
4169 | initData(provider: DataProvider, inputDimensions: DataStoreDimensionDefine[], dimValueGetter?: DimValueGetter): void;
|
4170 | getProvider(): DataProvider;
|
4171 | |
4172 |
|
4173 |
|
4174 |
|
4175 |
|
4176 |
|
4177 |
|
4178 | getSource(): Source;
|
4179 | |
4180 |
|
4181 |
|
4182 | ensureCalculationDimension(dimName: DimensionName, type: DataStoreDimensionType): DimensionIndex;
|
4183 | collectOrdinalMeta(dimIdx: number, ordinalMeta: OrdinalMeta): void;
|
4184 | getOrdinalMeta(dimIdx: number): OrdinalMeta;
|
4185 | getDimensionProperty(dimIndex: DimensionIndex): DataStoreDimensionDefine['property'];
|
4186 | |
4187 |
|
4188 |
|
4189 | appendData(data: ArrayLike<any>): number[];
|
4190 | appendValues(values: any[][], minFillLen?: number): {
|
4191 | start: number;
|
4192 | end: number;
|
4193 | };
|
4194 | private _initDataFromProvider;
|
4195 | count(): number;
|
4196 | |
4197 |
|
4198 |
|
4199 | get(dim: DimensionIndex, idx: number): ParsedValue;
|
4200 | getValues(idx: number): ParsedValue[];
|
4201 | getValues(dimensions: readonly DimensionIndex[], idx?: number): ParsedValue[];
|
4202 | |
4203 |
|
4204 |
|
4205 | getByRawIndex(dim: DimensionIndex, rawIdx: number): ParsedValue;
|
4206 | |
4207 |
|
4208 |
|
4209 | getSum(dim: DimensionIndex): number;
|
4210 | |
4211 |
|
4212 |
|
4213 | getMedian(dim: DimensionIndex): number;
|
4214 | |
4215 |
|
4216 |
|
4217 | indexOfRawIndex(rawIndex: number): number;
|
4218 | |
4219 |
|
4220 |
|
4221 |
|
4222 |
|
4223 |
|
4224 |
|
4225 |
|
4226 | indicesOfNearest(dim: DimensionIndex, value: number, maxDistance?: number): number[];
|
4227 | getIndices(): ArrayLike<number>;
|
4228 | |
4229 |
|
4230 |
|
4231 | filter(dims: DimensionIndex[], cb: FilterCb): DataStore;
|
4232 | |
4233 |
|
4234 |
|
4235 |
|
4236 | selectRange(range: {
|
4237 | [dimIdx: number]: [number, number];
|
4238 | }): DataStore;
|
4239 | |
4240 |
|
4241 |
|
4242 | map(dims: DimensionIndex[], cb: MapCb): DataStore;
|
4243 | |
4244 |
|
4245 |
|
4246 | modify(dims: DimensionIndex[], cb: MapCb): void;
|
4247 | private _updateDims;
|
4248 | |
4249 |
|
4250 |
|
4251 |
|
4252 |
|
4253 | lttbDownSample(valueDimension: DimensionIndex, rate: number): DataStore;
|
4254 | |
4255 |
|
4256 |
|
4257 |
|
4258 | downSample(dimension: DimensionIndex, rate: number, sampleValue: (frameValues: ArrayLike<ParsedValue>) => ParsedValueNumeric, sampleIndex: (frameValues: ArrayLike<ParsedValue>, value: ParsedValueNumeric) => number): DataStore;
|
4259 | |
4260 |
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 | each(dims: DimensionIndex[], cb: EachCb): void;
|
4268 | |
4269 |
|
4270 |
|
4271 | getDataExtent(dim: DimensionIndex): [number, number];
|
4272 | |
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 | getRawIndex: (idx: number) => number;
|
4278 | |
4279 |
|
4280 |
|
4281 | getRawDataItem(idx: number): OptionDataItem;
|
4282 | |
4283 |
|
4284 |
|
4285 |
|
4286 |
|
4287 | clone(clonedDims?: DimensionIndex[], ignoreIndices?: boolean): DataStore;
|
4288 | private _copyCommonProps;
|
4289 | private _cloneIndices;
|
4290 | private _getRawIdxIdentity;
|
4291 | private _getRawIdx;
|
4292 | private _updateGetRawIdx;
|
4293 | private static internalField;
|
4294 | }
|
4295 |
|
4296 | declare class SeriesDimensionDefine {
|
4297 | |
4298 |
|
4299 |
|
4300 |
|
4301 | type?: DimensionType;
|
4302 | |
4303 |
|
4304 |
|
4305 |
|
4306 | name: string;
|
4307 | |
4308 |
|
4309 |
|
4310 |
|
4311 |
|
4312 | displayName?: string;
|
4313 | tooltip?: boolean;
|
4314 | |
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 |
|
4320 |
|
4321 |
|
4322 |
|
4323 | storeDimIndex?: number;
|
4324 | |
4325 |
|
4326 |
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 |
|
4332 | coordDim?: string;
|
4333 | |
4334 |
|
4335 |
|
4336 |
|
4337 | coordDimIndex?: number;
|
4338 | |
4339 |
|
4340 |
|
4341 |
|
4342 |
|
4343 |
|
4344 |
|
4345 |
|
4346 |
|
4347 |
|
4348 |
|
4349 |
|
4350 |
|
4351 |
|
4352 |
|
4353 |
|
4354 |
|
4355 |
|
4356 |
|
4357 |
|
4358 |
|
4359 |
|
4360 |
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 |
|
4367 |
|
4368 |
|
4369 |
|
4370 |
|
4371 | otherDims?: DataVisualDimensions;
|
4372 | |
4373 |
|
4374 |
|
4375 |
|
4376 |
|
4377 | isExtraCoord?: boolean;
|
4378 | |
4379 |
|
4380 |
|
4381 | isCalculationCoord?: boolean;
|
4382 | defaultTooltip?: boolean;
|
4383 | ordinalMeta?: OrdinalMeta;
|
4384 | |
4385 |
|
4386 |
|
4387 | createInvertedIndices?: boolean;
|
4388 | |
4389 |
|
4390 |
|
4391 | constructor(opt?: object | SeriesDimensionDefine);
|
4392 | }
|
4393 |
|
4394 | /**
|
4395 | * Represents the dimension requirement of a series.
|
4396 | *
|
4397 | * NOTICE:
|
4398 | * When there are too many dimensions in dataset and many series, only the used dimensions
|
4399 | * (i.e., used by coord sys and declared in `series.encode`) are add to `dimensionDefineList`.
|
4400 | * But users may query data by other unused dimension names.
|
4401 | * In this case, users can only query data if and only if they have defined dimension names
|
4402 | * via ec option, so we provide `getDimensionIndexFromSource`, which only query them from
|
4403 | * `source` dimensions.
|
4404 | */
|
4405 | declare class SeriesDataSchema {
|
4406 | |
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 |
|
4417 | readonly dimensions: SeriesDimensionDefine[];
|
4418 | readonly source: Source;
|
4419 | private _fullDimCount;
|
4420 | private _dimNameMap;
|
4421 | private _dimOmitted;
|
4422 | constructor(opt: {
|
4423 | source: Source;
|
4424 | dimensions: SeriesDimensionDefine[];
|
4425 | fullDimensionCount: number;
|
4426 | dimensionOmitted: boolean;
|
4427 | });
|
4428 | isDimensionOmitted(): boolean;
|
4429 | private _updateDimOmitted;
|
4430 | /**
|
4431 | * @caution Can only be used when `dimensionOmitted: true`.
|
4432 | *
|
4433 | * Get index by user defined dimension name (i.e., not internal generate name).
|
4434 | * That is, get index from `dimensionsDefine`.
|
4435 | * If no `dimensionsDefine`, or no name get, return -1.
|
4436 | */
|
4437 | getSourceDimensionIndex(dimName: DimensionName): DimensionIndex;
|
4438 | /**
|
4439 | * @caution Can only be used when `dimensionOmitted: true`.
|
4440 | *
|
4441 | * Notice: may return `null`/`undefined` if user not specify dimension names.
|
4442 | */
|
4443 | getSourceDimension(dimIndex: DimensionIndex): DimensionDefinition;
|
4444 | makeStoreSchema(): {
|
4445 | dimensions: DataStoreDimensionDefine[];
|
4446 | hash: string;
|
4447 | };
|
4448 | makeOutputDimensionNames(): DimensionName[];
|
4449 | appendCalculationDimension(dimDef: SeriesDimensionDefine): void;
|
4450 | }
|
4451 |
|
4452 |
|
4453 |
|
4454 |
|
4455 |
|
4456 |
|
4457 |
|
4458 |
|
4459 |
|
4460 |
|
4461 |
|
4462 |
|
4463 |
|
4464 |
|
4465 |
|
4466 |
|
4467 |
|
4468 |
|
4469 |
|
4470 |
|
4471 |
|
4472 |
|
4473 |
|
4474 |
|
4475 |
|
4476 |
|
4477 |
|
4478 |
|
4479 |
|
4480 |
|
4481 |
|
4482 |
|
4483 |
|
4484 |
|
4485 |
|
4486 |
|
4487 |
|
4488 |
|
4489 |
|
4490 |
|
4491 |
|
4492 |
|
4493 |
|
4494 |
|
4495 |
|
4496 |
|
4497 |
|
4498 |
|
4499 |
|
4500 |
|
4501 |
|
4502 |
|
4503 |
|
4504 |
|
4505 |
|
4506 |
|
4507 |
|
4508 |
|
4509 |
|
4510 |
|
4511 |
|
4512 |
|
4513 |
|
4514 |
|
4515 |
|
4516 |
|
4517 |
|
4518 |
|
4519 |
|
4520 |
|
4521 |
|
4522 |
|
4523 |
|
4524 |
|
4525 |
|
4526 |
|
4527 |
|
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 |
|
4534 |
|
4535 |
|
4536 |
|
4537 |
|
4538 |
|
4539 |
|
4540 |
|
4541 |
|
4542 | declare class SourceManager {
|
4543 | private _sourceHost;
|
4544 | private _sourceList;
|
4545 | private _storeList;
|
4546 | private _upstreamSignList;
|
4547 | private _versionSignBase;
|
4548 | private _dirty;
|
4549 | constructor(sourceHost: DatasetModel | SeriesModel);
|
4550 | /**
|
4551 | * Mark dirty.
|
4552 | */
|
4553 | dirty(): void;
|
4554 | private _setLocalSource;
|
4555 | /**
|
4556 | * For detecting whether the upstream source is dirty, so that
|
4557 | * the local cached source (in `_sourceList`) should be discarded.
|
4558 | */
|
4559 | private _getVersionSign;
|
4560 | /**
|
4561 | * Always return a source instance. Otherwise throw error.
|
4562 | */
|
4563 | prepareSource(): void;
|
4564 | private _createSource;
|
4565 | private _applyTransform;
|
4566 | private _isDirty;
|
4567 | /**
|
4568 | * @param sourceIndex By default 0, means "main source".
|
4569 | * In most cases there is only one source.
|
4570 | */
|
4571 | getSource(sourceIndex?: number): Source;
|
4572 | /**
|
4573 | *
|
4574 | * Get a data store which can be shared across series.
|
4575 | * Only available for series.
|
4576 | *
|
4577 | * @param seriesDimRequest Dimensions that are generated in series.
|
4578 | * Should have been sorted by `storeDimIndex` asc.
|
4579 | */
|
4580 | getSharedDataStore(seriesDimRequest: SeriesDataSchema): DataStore;
|
4581 | private _innerGetDataStore;
|
4582 | /**
|
4583 | * PENDING: Is it fast enough?
|
4584 | * If no upstream, return empty array.
|
4585 | */
|
4586 | private _getUpstreamSourceManagers;
|
4587 | private _getSourceMetaRawOption;
|
4588 | }
|
4589 |
|
4590 | /**
|
4591 | * This module is imported by echarts directly.
|
4592 | *
|
4593 | * Notice:
|
4594 | * Always keep this file exists for backward compatibility.
|
4595 | * Because before 4.1.0, dataset is an optional component,
|
4596 | * some users may import this module manually.
|
4597 | */
|
4598 |
|
4599 | interface DatasetOption extends Pick<ComponentOption, 'type' | 'id' | 'name'>, Pick<SeriesEncodeOptionMixin, 'dimensions'> {
|
4600 | mainType?: 'dataset';
|
4601 | seriesLayoutBy?: SeriesLayoutBy;
|
4602 | sourceHeader?: OptionSourceHeader;
|
4603 | source?: OptionSourceData;
|
4604 | fromDatasetIndex?: number;
|
4605 | fromDatasetId?: string;
|
4606 | transform?: DataTransformOption | PipedDataTransformOption;
|
4607 | fromTransformResult?: number;
|
4608 | }
|
4609 | declare class DatasetModel<Opts extends DatasetOption = DatasetOption> extends ComponentModel<Opts> {
|
4610 | type: string;
|
4611 | static type: string;
|
4612 | static defaultOption: DatasetOption;
|
4613 | private _sourceManager;
|
4614 | init(option: Opts, parentModel: Model, ecModel: GlobalModel): void;
|
4615 | mergeOption(newOption: Opts, ecModel: GlobalModel): void;
|
4616 | optionUpdated(): void;
|
4617 | getSourceManager(): SourceManager;
|
4618 | }
|
4619 |
|
4620 |
|
4621 |
|
4622 |
|
4623 |
|
4624 |
|
4625 |
|
4626 |
|
4627 |
|
4628 |
|
4629 |
|
4630 |
|
4631 |
|
4632 |
|
4633 |
|
4634 |
|
4635 |
|
4636 |
|
4637 |
|
4638 |
|
4639 |
|
4640 |
|
4641 |
|
4642 |
|
4643 |
|
4644 |
|
4645 |
|
4646 |
|
4647 |
|
4648 |
|
4649 |
|
4650 |
|
4651 |
|
4652 |
|
4653 |
|
4654 |
|
4655 | interface SourceMetaRawOption {
|
4656 | seriesLayoutBy: SeriesLayoutBy;
|
4657 | sourceHeader: OptionSourceHeader;
|
4658 | dimensions: DimensionDefinitionLoose[];
|
4659 | }
|
4660 | interface Source extends SourceImpl {
|
4661 | }
|
4662 | declare class SourceImpl {
|
4663 | |
4664 |
|
4665 |
|
4666 | readonly data: OptionSourceData;
|
4667 | |
4668 |
|
4669 |
|
4670 |
|
4671 | readonly sourceFormat: SourceFormat;
|
4672 | |
4673 |
|
4674 |
|
4675 |
|
4676 | readonly seriesLayoutBy: SeriesLayoutBy;
|
4677 | |
4678 |
|
4679 |
|
4680 |
|
4681 |
|
4682 |
|
4683 |
|
4684 | readonly dimensionsDefine: DimensionDefinition[];
|
4685 | |
4686 |
|
4687 |
|
4688 |
|
4689 |
|
4690 |
|
4691 | readonly startIndex: number;
|
4692 | |
4693 |
|
4694 |
|
4695 |
|
4696 |
|
4697 | readonly dimensionsDetectedCount: number;
|
4698 | |
4699 |
|
4700 |
|
4701 | readonly metaRawOption: SourceMetaRawOption;
|
4702 | constructor(fields: {
|
4703 | data: OptionSourceData;
|
4704 | sourceFormat: SourceFormat;
|
4705 | seriesLayoutBy?: SeriesLayoutBy;
|
4706 | dimensionsDefine?: DimensionDefinition[];
|
4707 | startIndex?: number;
|
4708 | dimensionsDetectedCount?: number;
|
4709 | metaRawOption?: SourceMetaRawOption;
|
4710 | encodeDefine?: HashMap<OptionEncodeValue, DimensionName>;
|
4711 | });
|
4712 | }
|
4713 |
|
4714 | interface DataProvider {
|
4715 | |
4716 |
|
4717 |
|
4718 |
|
4719 |
|
4720 |
|
4721 | pure?: boolean;
|
4722 | |
4723 |
|
4724 |
|
4725 | persistent?: boolean;
|
4726 | getSource(): Source;
|
4727 | count(): number;
|
4728 | getItem(idx: number, out?: OptionDataItem): OptionDataItem;
|
4729 | fillStorage?(start: number, end: number, out: ArrayLike$1<ParsedValue>[], extent: number[][]): void;
|
4730 | appendData?(newData: ArrayLike$1<OptionDataItem>): void;
|
4731 | clean?(): void;
|
4732 | }
|
4733 |
|
4734 | declare type DimensionSummaryEncode = {
|
4735 | defaultedLabel: DimensionName[];
|
4736 | defaultedTooltip: DimensionName[];
|
4737 | [coordOrVisualDimName: string]: DimensionName[];
|
4738 | };
|
4739 | declare type DimensionSummary = {
|
4740 | encode: DimensionSummaryEncode;
|
4741 | userOutput: DimensionUserOuput;
|
4742 | dataDimsOnCoord: DimensionName[];
|
4743 | dataDimIndicesOnCoord: DimensionIndex[];
|
4744 | encodeFirstDimNotExtra: {
|
4745 | [coordDim: string]: DimensionName;
|
4746 | };
|
4747 | };
|
4748 | declare type DimensionUserOuputEncode = {
|
4749 | [coordOrVisualDimName: string]: DimensionIndex[];
|
4750 | };
|
4751 | declare class DimensionUserOuput {
|
4752 | private _encode;
|
4753 | private _cachedDimNames;
|
4754 | private _schema?;
|
4755 | constructor(encode: DimensionUserOuputEncode, dimRequest?: SeriesDataSchema);
|
4756 | get(): {
|
4757 | fullDimensions: DimensionName[];
|
4758 | encode: DimensionUserOuputEncode;
|
4759 | };
|
4760 | |
4761 |
|
4762 |
|
4763 |
|
4764 |
|
4765 |
|
4766 |
|
4767 | private _getFullDimensionNames;
|
4768 | }
|
4769 |
|
4770 | declare class Graph {
|
4771 | type: 'graph';
|
4772 | readonly nodes: GraphNode[];
|
4773 | readonly edges: GraphEdge[];
|
4774 | data: SeriesData;
|
4775 | edgeData: SeriesData;
|
4776 | |
4777 |
|
4778 |
|
4779 | private _directed;
|
4780 | private _nodesMap;
|
4781 | |
4782 |
|
4783 |
|
4784 |
|
4785 | private _edgesMap;
|
4786 | constructor(directed?: boolean);
|
4787 | /**
|
4788 | * If is directed graph
|
4789 | */
|
4790 | isDirected(): boolean;
|
4791 | /**
|
4792 | * Add a new node
|
4793 | */
|
4794 | addNode(id: string | number, dataIndex?: number): GraphNode;
|
4795 | /**
|
4796 | * Get node by data index
|
4797 | */
|
4798 | getNodeByIndex(dataIndex: number): GraphNode;
|
4799 | /**
|
4800 | * Get node by id
|
4801 | */
|
4802 | getNodeById(id: string): GraphNode;
|
4803 | /**
|
4804 | * Add a new edge
|
4805 | */
|
4806 | addEdge(n1: GraphNode | number | string, n2: GraphNode | number | string, dataIndex?: number): GraphEdge;
|
4807 | /**
|
4808 | * Get edge by data index
|
4809 | */
|
4810 | getEdgeByIndex(dataIndex: number): GraphEdge;
|
4811 | /**
|
4812 | * Get edge by two linked nodes
|
4813 | */
|
4814 | getEdge(n1: string | GraphNode, n2: string | GraphNode): GraphEdge;
|
4815 | /**
|
4816 | * Iterate all nodes
|
4817 | */
|
4818 | eachNode<Ctx>(cb: (this: Ctx, node: GraphNode, idx: number) => void, context?: Ctx): void;
|
4819 | /**
|
4820 | * Iterate all edges
|
4821 | */
|
4822 | eachEdge<Ctx>(cb: (this: Ctx, edge: GraphEdge, idx: number) => void, context?: Ctx): void;
|
4823 | /**
|
4824 | * Breadth first traverse
|
4825 | * Return true to stop traversing
|
4826 | */
|
4827 | breadthFirstTraverse<Ctx>(cb: (this: Ctx, node: GraphNode, fromNode: GraphNode) => boolean | void, startNode: GraphNode | string, direction: 'none' | 'in' | 'out', context?: Ctx): void;
|
4828 | update(): void;
|
4829 | /**
|
4830 | * @return {module:echarts/data/Graph}
|
4831 | */
|
4832 | clone(): Graph;
|
4833 | }
|
4834 | interface GraphDataProxyMixin {
|
4835 | getValue(dimension?: DimensionLoose): ParsedValue;
|
4836 | setVisual(key: string | Dictionary<any>, value?: any): void;
|
4837 | getVisual(key: string): any;
|
4838 | setLayout(layout: any, merge?: boolean): void;
|
4839 | getLayout(): any;
|
4840 | getGraphicEl(): Element;
|
4841 | getRawIndex(): number;
|
4842 | }
|
4843 | declare class GraphEdge {
|
4844 | |
4845 |
|
4846 |
|
4847 | node1: GraphNode;
|
4848 | |
4849 |
|
4850 |
|
4851 | node2: GraphNode;
|
4852 | dataIndex: number;
|
4853 | hostGraph: Graph;
|
4854 | constructor(n1: GraphNode, n2: GraphNode, dataIndex?: number);
|
4855 | getModel<T = unknown>(): Model<T>;
|
4856 | getModel<T = unknown, S extends keyof T = keyof T>(path: S): Model<T[S]>;
|
4857 | getAdjacentDataIndices(): {
|
4858 | node: number[];
|
4859 | edge: number[];
|
4860 | };
|
4861 | getTrajectoryDataIndices(): {
|
4862 | node: number[];
|
4863 | edge: number[];
|
4864 | };
|
4865 | }
|
4866 | interface GraphEdge extends GraphDataProxyMixin {
|
4867 | }
|
4868 | declare class GraphNode {
|
4869 | id: string;
|
4870 | inEdges: GraphEdge[];
|
4871 | outEdges: GraphEdge[];
|
4872 | edges: GraphEdge[];
|
4873 | hostGraph: Graph;
|
4874 | dataIndex: number;
|
4875 | __visited: boolean;
|
4876 | constructor(id?: string, dataIndex?: number);
|
4877 | /**
|
4878 | * @return {number}
|
4879 | */
|
4880 | degree(): number;
|
4881 | |
4882 |
|
4883 |
|
4884 | inDegree(): number;
|
4885 | |
4886 |
|
4887 |
|
4888 | outDegree(): number;
|
4889 | getModel<T = unknown>(): Model<T>;
|
4890 | getModel<T = unknown, S extends keyof T = keyof T>(path: S): Model<T[S]>;
|
4891 | getAdjacentDataIndices(): {
|
4892 | node: number[];
|
4893 | edge: number[];
|
4894 | };
|
4895 | getTrajectoryDataIndices(): {
|
4896 | node: number[];
|
4897 | edge: number[];
|
4898 | };
|
4899 | }
|
4900 | interface GraphNode extends GraphDataProxyMixin {
|
4901 | }
|
4902 |
|
4903 | declare type TreeTraverseOrder = 'preorder' | 'postorder';
|
4904 | declare type TreeTraverseCallback<Ctx> = (this: Ctx, node: TreeNode) => boolean | void;
|
4905 | declare type TreeTraverseOption = {
|
4906 | order?: TreeTraverseOrder;
|
4907 | attr?: 'children' | 'viewChildren';
|
4908 | };
|
4909 | interface TreeNodeOption extends Pick<OptionDataItemObject<OptionDataValue>, 'name' | 'value'> {
|
4910 | children?: TreeNodeOption[];
|
4911 | }
|
4912 | declare class TreeNode {
|
4913 | name: string;
|
4914 | depth: number;
|
4915 | height: number;
|
4916 | parentNode: TreeNode;
|
4917 | |
4918 |
|
4919 |
|
4920 |
|
4921 |
|
4922 |
|
4923 |
|
4924 | dataIndex: number;
|
4925 | children: TreeNode[];
|
4926 | viewChildren: TreeNode[];
|
4927 | isExpand: boolean;
|
4928 | readonly hostTree: Tree<Model>;
|
4929 | constructor(name: string, hostTree: Tree<Model>);
|
4930 | /**
|
4931 | * The node is removed.
|
4932 | */
|
4933 | isRemoved(): boolean;
|
4934 | /**
|
4935 | * Travel this subtree (include this node).
|
4936 | * Usage:
|
4937 | * node.eachNode(function () { ... }); // preorder
|
4938 | * node.eachNode('preorder', function () { ... }); // preorder
|
4939 | * node.eachNode('postorder', function () { ... }); // postorder
|
4940 | * node.eachNode(
|
4941 | * {order: 'postorder', attr: 'viewChildren'},
|
4942 | * function () { ... }
|
4943 | * ); // postorder
|
4944 | *
|
4945 | * @param options If string, means order.
|
4946 | * @param options.order 'preorder' or 'postorder'
|
4947 | * @param options.attr 'children' or 'viewChildren'
|
4948 | * @param cb If in preorder and return false,
|
4949 | * its subtree will not be visited.
|
4950 | */
|
4951 | eachNode<Ctx>(options: TreeTraverseOrder, cb: TreeTraverseCallback<Ctx>, context?: Ctx): void;
|
4952 | eachNode<Ctx>(options: TreeTraverseOption, cb: TreeTraverseCallback<Ctx>, context?: Ctx): void;
|
4953 | eachNode<Ctx>(cb: TreeTraverseCallback<Ctx>, context?: Ctx): void;
|
4954 | /**
|
4955 | * Update depth and height of this subtree.
|
4956 | */
|
4957 | updateDepthAndHeight(depth: number): void;
|
4958 | getNodeById(id: string): TreeNode;
|
4959 | contains(node: TreeNode): boolean;
|
4960 | /**
|
4961 | * @param includeSelf Default false.
|
4962 | * @return order: [root, child, grandchild, ...]
|
4963 | */
|
4964 | getAncestors(includeSelf?: boolean): TreeNode[];
|
4965 | getAncestorsIndices(): number[];
|
4966 | getDescendantIndices(): number[];
|
4967 | getValue(dimension?: DimensionLoose): ParsedValue;
|
4968 | setLayout(layout: any, merge?: boolean): void;
|
4969 | /**
|
4970 | * @return {Object} layout
|
4971 | */
|
4972 | getLayout(): any;
|
4973 | getModel<T = unknown>(): Model<T>;
|
4974 | getLevelModel(): Model;
|
4975 | |
4976 |
|
4977 |
|
4978 |
|
4979 |
|
4980 |
|
4981 |
|
4982 | setVisual(key: string, value: any): void;
|
4983 | setVisual(obj: Dictionary<any>): void;
|
4984 | |
4985 |
|
4986 |
|
4987 |
|
4988 | getVisual(key: string): unknown;
|
4989 | getRawIndex(): number;
|
4990 | getId(): string;
|
4991 | |
4992 |
|
4993 |
|
4994 | getChildIndex(): number;
|
4995 | |
4996 |
|
4997 |
|
4998 |
|
4999 |
|
5000 |
|
5001 | isAncestorOf(node: TreeNode): boolean;
|
5002 | |
5003 |
|
5004 |
|
5005 |
|
5006 |
|
5007 |
|
5008 | isDescendantOf(node: TreeNode): boolean;
|
5009 | }
|
5010 | declare class Tree<HostModel extends Model = Model, LevelOption = any> {
|
5011 | type: 'tree';
|
5012 | root: TreeNode;
|
5013 | data: SeriesData;
|
5014 | hostModel: HostModel;
|
5015 | levelModels: Model<LevelOption>[];
|
5016 | private _nodes;
|
5017 | constructor(hostModel: HostModel);
|
5018 | /**
|
5019 | * Travel this subtree (include this node).
|
5020 | * Usage:
|
5021 | * node.eachNode(function () { ... }); // preorder
|
5022 | * node.eachNode('preorder', function () { ... }); // preorder
|
5023 | * node.eachNode('postorder', function () { ... }); // postorder
|
5024 | * node.eachNode(
|
5025 | * {order: 'postorder', attr: 'viewChildren'},
|
5026 | * function () { ... }
|
5027 | * ); // postorder
|
5028 | *
|
5029 | * @param options If string, means order.
|
5030 | * @param options.order 'preorder' or 'postorder'
|
5031 | * @param options.attr 'children' or 'viewChildren'
|
5032 | * @param cb
|
5033 | * @param context
|
5034 | */
|
5035 | eachNode<Ctx>(options: TreeTraverseOrder, cb: TreeTraverseCallback<Ctx>, context?: Ctx): void;
|
5036 | eachNode<Ctx>(options: TreeTraverseOption, cb: TreeTraverseCallback<Ctx>, context?: Ctx): void;
|
5037 | eachNode<Ctx>(cb: TreeTraverseCallback<Ctx>, context?: Ctx): void;
|
5038 | getNodeByDataIndex(dataIndex: number): TreeNode;
|
5039 | getNodeById(name: string): TreeNode;
|
5040 | /**
|
5041 | * Update item available by list,
|
5042 | * when list has been performed options like 'filterSelf' or 'map'.
|
5043 | */
|
5044 | update(): void;
|
5045 | /**
|
5046 | * Clear all layouts
|
5047 | */
|
5048 | clearLayouts(): void;
|
5049 | /**
|
5050 | * data node format:
|
5051 | * {
|
5052 | * name: ...
|
5053 | * value: ...
|
5054 | * children: [
|
5055 | * {
|
5056 | * name: ...
|
5057 | * value: ...
|
5058 | * children: ...
|
5059 | * },
|
5060 | * ...
|
5061 | * ]
|
5062 | * }
|
5063 | */
|
5064 | static createTree<T extends TreeNodeOption, HostModel extends Model>(dataRoot: T, hostModel: HostModel, beforeLink?: (data: SeriesData) => void): Tree<HostModel, any>;
|
5065 | }
|
5066 |
|
5067 | declare type VisualOptionBase = {
|
5068 | [key in BuiltinVisualProperty]?: any;
|
5069 | };
|
5070 | declare type LabelFormatter = (min: OptionDataValue, max?: OptionDataValue) => string;
|
5071 | interface VisualMapOption<T extends VisualOptionBase = VisualOptionBase> extends ComponentOption, BoxLayoutOptionMixin, BorderOptionMixin {
|
5072 | mainType?: 'visualMap';
|
5073 | show?: boolean;
|
5074 | align?: string;
|
5075 | realtime?: boolean;
|
5076 | |
5077 |
|
5078 |
|
5079 |
|
5080 |
|
5081 |
|
5082 | seriesIndex?: 'all' | number[] | number;
|
5083 | |
5084 |
|
5085 |
|
5086 | min?: number;
|
5087 | |
5088 |
|
5089 |
|
5090 | max?: number;
|
5091 | |
5092 |
|
5093 |
|
5094 | dimension?: number;
|
5095 | |
5096 |
|
5097 |
|
5098 | inRange?: T;
|
5099 | |
5100 |
|
5101 |
|
5102 | outOfRange?: T;
|
5103 | controller?: {
|
5104 | inRange?: T;
|
5105 | outOfRange?: T;
|
5106 | };
|
5107 | target?: {
|
5108 | inRange?: T;
|
5109 | outOfRange?: T;
|
5110 | };
|
5111 | |
5112 |
|
5113 |
|
5114 | itemWidth?: number;
|
5115 | |
5116 |
|
5117 |
|
5118 | itemHeight?: number;
|
5119 | inverse?: boolean;
|
5120 | orient?: 'horizontal' | 'vertical';
|
5121 | backgroundColor?: ZRColor;
|
5122 | contentColor?: ZRColor;
|
5123 | inactiveColor?: ZRColor;
|
5124 | |
5125 |
|
5126 |
|
5127 | padding?: number[] | number;
|
5128 | |
5129 |
|
5130 |
|
5131 | textGap?: number;
|
5132 | precision?: number;
|
5133 | |
5134 |
|
5135 |
|
5136 |
|
5137 | color?: ColorString[];
|
5138 | formatter?: string | LabelFormatter;
|
5139 | |
5140 |
|
5141 |
|
5142 | text?: string[];
|
5143 | textStyle?: LabelOption;
|
5144 | categories?: unknown;
|
5145 | }
|
5146 | interface VisualMeta {
|
5147 | stops: {
|
5148 | value: number;
|
5149 | color: ColorString;
|
5150 | }[];
|
5151 | outerColors: ColorString[];
|
5152 | dimension?: DimensionIndex;
|
5153 | }
|
5154 |
|
5155 | declare type ItrParamDims = DimensionLoose | Array<DimensionLoose>;
|
5156 | declare type CtxOrList<Ctx> = unknown extends Ctx ? SeriesData : Ctx;
|
5157 | declare type EachCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => void;
|
5158 | declare type EachCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, idx: number) => void;
|
5159 | declare type EachCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, y: ParsedValue, idx: number) => void;
|
5160 | declare type EachCb$1<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => void;
|
5161 | declare type FilterCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => boolean;
|
5162 | declare type FilterCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, idx: number) => boolean;
|
5163 | declare type FilterCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, y: ParsedValue, idx: number) => boolean;
|
5164 | declare type FilterCb$1<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => boolean;
|
5165 | declare type MapArrayCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => any;
|
5166 | declare type MapArrayCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, idx: number) => any;
|
5167 | declare type MapArrayCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, y: ParsedValue, idx: number) => any;
|
5168 | declare type MapArrayCb<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => any;
|
5169 | declare type MapCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, idx: number) => ParsedValue | ParsedValue[];
|
5170 | declare type MapCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, y: ParsedValue, idx: number) => ParsedValue | ParsedValue[];
|
5171 | declare type SeriesDimensionDefineLoose = string | object | SeriesDimensionDefine;
|
5172 | declare type SeriesDimensionLoose = DimensionLoose;
|
5173 | declare type SeriesDimensionName = DimensionName;
|
5174 | interface DefaultDataVisual {
|
5175 | style: PathStyleProps;
|
5176 | drawType: 'fill' | 'stroke';
|
5177 | symbol?: string;
|
5178 | symbolSize?: number | number[];
|
5179 | symbolRotate?: number;
|
5180 | symbolKeepAspect?: boolean;
|
5181 | symbolOffset?: string | number | (string | number)[];
|
5182 | liftZ?: number;
|
5183 | legendIcon?: string;
|
5184 | legendLineStyle?: LineStyleProps;
|
5185 | visualMeta?: VisualMeta[];
|
5186 | colorFromPalette?: boolean;
|
5187 | decal?: DecalObject;
|
5188 | }
|
5189 | interface DataCalculationInfo<SERIES_MODEL> {
|
5190 | stackedDimension: DimensionName;
|
5191 | stackedByDimension: DimensionName;
|
5192 | isStackedByIndex: boolean;
|
5193 | stackedOverDimension: DimensionName;
|
5194 | stackResultDimension: DimensionName;
|
5195 | stackedOnSeries?: SERIES_MODEL;
|
5196 | }
|
5197 | declare class SeriesData<HostModel extends Model = Model, Visual extends DefaultDataVisual = DefaultDataVisual> {
|
5198 | readonly type = "list";
|
5199 | |
5200 |
|
5201 |
|
5202 |
|
5203 |
|
5204 |
|
5205 |
|
5206 | readonly dimensions: SeriesDimensionName[];
|
5207 | private _dimInfos;
|
5208 | private _dimOmitted;
|
5209 | private _schema?;
|
5210 | |
5211 |
|
5212 |
|
5213 |
|
5214 |
|
5215 |
|
5216 | private _dimIdxToName?;
|
5217 | readonly hostModel: HostModel;
|
5218 | |
5219 |
|
5220 |
|
5221 | dataType: SeriesDataType;
|
5222 | |
5223 |
|
5224 |
|
5225 |
|
5226 | graph?: Graph;
|
5227 | |
5228 |
|
5229 |
|
5230 |
|
5231 | tree?: Tree;
|
5232 | private _store;
|
5233 | private _nameList;
|
5234 | private _idList;
|
5235 | private _visual;
|
5236 | private _layout;
|
5237 | private _itemVisuals;
|
5238 | private _itemLayouts;
|
5239 | private _graphicEls;
|
5240 | private _approximateExtent;
|
5241 | private _dimSummary;
|
5242 | private _invertedIndicesMap;
|
5243 | private _calculationInfo;
|
5244 | userOutput: DimensionSummary['userOutput'];
|
5245 | hasItemOption: boolean;
|
5246 | private _nameRepeatCount;
|
5247 | private _nameDimIdx;
|
5248 | private _idDimIdx;
|
5249 | private __wrappedMethods;
|
5250 | TRANSFERABLE_METHODS: readonly ["cloneShallow", "downSample", "lttbDownSample", "map"];
|
5251 | CHANGABLE_METHODS: readonly ["filterSelf", "selectRange"];
|
5252 | DOWNSAMPLE_METHODS: readonly ["downSample", "lttbDownSample"];
|
5253 | |
5254 |
|
5255 |
|
5256 |
|
5257 |
|
5258 | constructor(dimensionsInput: SeriesDataSchema | SeriesDimensionDefineLoose[], hostModel: HostModel);
|
5259 | /**
|
5260 | *
|
5261 | * Get concrete dimension name by dimension name or dimension index.
|
5262 | * If input a dimension name, do not validate whether the dimension name exits.
|
5263 | *
|
5264 | * @caution
|
5265 | * @param dim Must make sure the dimension is `SeriesDimensionLoose`.
|
5266 | * Because only those dimensions will have auto-generated dimension names if not
|
5267 | * have a user-specified name, and other dimensions will get a return of null/undefined.
|
5268 | *
|
5269 | * @notice Because of this reason, should better use `getDimensionIndex` instead, for examples:
|
5270 | * ```js
|
5271 | * const val = data.getStore().get(data.getDimensionIndex(dim), dataIdx);
|
5272 | * ```
|
5273 | *
|
5274 | * @return Concrete dim name.
|
5275 | */
|
5276 | getDimension(dim: SeriesDimensionLoose): DimensionName;
|
5277 | /**
|
5278 | * Get dimension index in data store. Return -1 if not found.
|
5279 | * Can be used to index value from getRawValue.
|
5280 | */
|
5281 | getDimensionIndex(dim: DimensionLoose): DimensionIndex;
|
5282 | /**
|
5283 | * The meanings of the input parameter `dim`:
|
5284 | *
|
5285 | * + If dim is a number (e.g., `1`), it means the index of the dimension.
|
5286 | * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'.
|
5287 | * + If dim is a number-like string (e.g., `"1"`):
|
5288 | * + If there is the same concrete dim name defined in `series.dimensions` or `dataset.dimensions`,
|
5289 | * it means that concrete name.
|
5290 | * + If not, it will be converted to a number, which means the index of the dimension.
|
5291 | * (why? because of the backward compatibility. We have been tolerating number-like string in
|
5292 | * dimension setting, although now it seems that it is not a good idea.)
|
5293 | * For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`,
|
5294 | * if no dimension name is defined as `"1"`.
|
5295 | * + If dim is a not-number-like string, it means the concrete dim name.
|
5296 | * For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`,
|
5297 | * or customized in `dimensions` property of option like `"age"`.
|
5298 | *
|
5299 | * @return recognized `DimensionIndex`. Otherwise return null/undefined (means that dim is `DimensionName`).
|
5300 | */
|
5301 | private _recognizeDimIndex;
|
5302 | private _getStoreDimIndex;
|
5303 | /**
|
5304 | * Get type and calculation info of particular dimension
|
5305 | * @param dim
|
5306 | * Dimension can be concrete names like x, y, z, lng, lat, angle, radius
|
5307 | * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
|
5308 | */
|
5309 | getDimensionInfo(dim: SeriesDimensionLoose): SeriesDimensionDefine;
|
5310 | /**
|
5311 | * If `dimName` if from outside of `SeriesData`,
|
5312 | * use this method other than visit `this._dimInfos` directly.
|
5313 | */
|
5314 | private _getDimInfo;
|
5315 | private _initGetDimensionInfo;
|
5316 | /**
|
5317 | * concrete dimension name list on coord.
|
5318 | */
|
5319 | getDimensionsOnCoord(): SeriesDimensionName[];
|
5320 | /**
|
5321 | * @param coordDim
|
5322 | * @param idx A coordDim may map to more than one data dim.
|
5323 | * If not specified, return the first dim not extra.
|
5324 | * @return concrete data dim. If not found, return null/undefined
|
5325 | */
|
5326 | mapDimension(coordDim: SeriesDimensionName): SeriesDimensionName;
|
5327 | mapDimension(coordDim: SeriesDimensionName, idx: number): SeriesDimensionName;
|
5328 | mapDimensionsAll(coordDim: SeriesDimensionName): SeriesDimensionName[];
|
5329 | getStore(): DataStore;
|
5330 | /**
|
5331 | * Initialize from data
|
5332 | * @param data source or data or data store.
|
5333 | * @param nameList The name of a datum is used on data diff and
|
5334 | * default label/tooltip.
|
5335 | * A name can be specified in encode.itemName,
|
5336 | * or dataItem.name (only for series option data),
|
5337 | * or provided in nameList from outside.
|
5338 | */
|
5339 | initData(data: Source | OptionSourceData | DataStore | DataProvider, nameList?: string[], dimValueGetter?: DimValueGetter): void;
|
5340 | /**
|
5341 | * Caution: Can be only called on raw data (before `this._indices` created).
|
5342 | */
|
5343 | appendData(data: ArrayLike$1<any>): void;
|
5344 | /**
|
5345 | * Caution: Can be only called on raw data (before `this._indices` created).
|
5346 | * This method does not modify `rawData` (`dataProvider`), but only
|
5347 | * add values to store.
|
5348 | *
|
5349 | * The final count will be increased by `Math.max(values.length, names.length)`.
|
5350 | *
|
5351 | * @param values That is the SourceType: 'arrayRows', like
|
5352 | * [
|
5353 | * [12, 33, 44],
|
5354 | * [NaN, 43, 1],
|
5355 | * ['-', 'asdf', 0]
|
5356 | * ]
|
5357 | * Each item is exactly corresponding to a dimension.
|
5358 | */
|
5359 | appendValues(values: any[][], names?: string[]): void;
|
5360 | private _updateOrdinalMeta;
|
5361 | private _shouldMakeIdFromName;
|
5362 | private _doInit;
|
5363 | /**
|
5364 | * PENDING: In fact currently this function is only used to short-circuit
|
5365 | * the calling of `scale.unionExtentFromData` when data have been filtered by modules
|
5366 | * like "dataZoom". `scale.unionExtentFromData` is used to calculate data extent for series on
|
5367 | * an axis, but if a "axis related data filter module" is used, the extent of the axis have
|
5368 | * been fixed and no need to calling `scale.unionExtentFromData` actually.
|
5369 | * But if we add "custom data filter" in future, which is not "axis related", this method may
|
5370 | * be still needed.
|
5371 | *
|
5372 | * Optimize for the scenario that data is filtered by a given extent.
|
5373 | * Consider that if data amount is more than hundreds of thousand,
|
5374 | * extent calculation will cost more than 10ms and the cache will
|
5375 | * be erased because of the filtering.
|
5376 | */
|
5377 | getApproximateExtent(dim: SeriesDimensionLoose): [number, number];
|
5378 | /**
|
5379 | * Calculate extent on a filtered data might be time consuming.
|
5380 | * Approximate extent is only used for: calculate extent of filtered data outside.
|
5381 | */
|
5382 | setApproximateExtent(extent: [number, number], dim: SeriesDimensionLoose): void;
|
5383 | getCalculationInfo<CALC_INFO_KEY extends keyof DataCalculationInfo<HostModel>>(key: CALC_INFO_KEY): DataCalculationInfo<HostModel>[CALC_INFO_KEY];
|
5384 | /**
|
5385 | * @param key or k-v object
|
5386 | */
|
5387 | setCalculationInfo(key: DataCalculationInfo<HostModel>): void;
|
5388 | setCalculationInfo<CALC_INFO_KEY extends keyof DataCalculationInfo<HostModel>>(key: CALC_INFO_KEY, value: DataCalculationInfo<HostModel>[CALC_INFO_KEY]): void;
|
5389 | /**
|
5390 | * @return Never be null/undefined. `number` will be converted to string. Because:
|
5391 | * In most cases, name is used in display, where returning a string is more convenient.
|
5392 | * In other cases, name is used in query (see `indexOfName`), where we can keep the
|
5393 | * rule that name `2` equals to name `'2'`.
|
5394 | */
|
5395 | getName(idx: number): string;
|
5396 | private _getCategory;
|
5397 | /**
|
5398 | * @return Never null/undefined. `number` will be converted to string. Because:
|
5399 | * In all cases having encountered at present, id is used in making diff comparison, which
|
5400 | * are usually based on hash map. We can keep the rule that the internal id are always string
|
5401 | * (treat `2` is the same as `'2'`) to make the related logic simple.
|
5402 | */
|
5403 | getId(idx: number): string;
|
5404 | count(): number;
|
5405 | /**
|
5406 | * Get value. Return NaN if idx is out of range.
|
5407 | *
|
5408 | * @notice Should better to use `data.getStore().get(dimIndex, dataIdx)` instead.
|
5409 | */
|
5410 | get(dim: SeriesDimensionName, idx: number): ParsedValue;
|
5411 | /**
|
5412 | * @notice Should better to use `data.getStore().getByRawIndex(dimIndex, dataIdx)` instead.
|
5413 | */
|
5414 | getByRawIndex(dim: SeriesDimensionName, rawIdx: number): ParsedValue;
|
5415 | getIndices(): globalThis.ArrayLike<number>;
|
5416 | getDataExtent(dim: DimensionLoose): [number, number];
|
5417 | getSum(dim: DimensionLoose): number;
|
5418 | getMedian(dim: DimensionLoose): number;
|
5419 | /**
|
5420 | * Get value for multi dimensions.
|
5421 | * @param dimensions If ignored, using all dimensions.
|
5422 | */
|
5423 | getValues(idx: number): ParsedValue[];
|
5424 | getValues(dimensions: readonly DimensionName[], idx: number): ParsedValue[];
|
5425 | /**
|
5426 | * If value is NaN. Including '-'
|
5427 | * Only check the coord dimensions.
|
5428 | */
|
5429 | hasValue(idx: number): boolean;
|
5430 | /**
|
5431 | * Retrieve the index with given name
|
5432 | */
|
5433 | indexOfName(name: string): number;
|
5434 | getRawIndex(idx: number): number;
|
5435 | indexOfRawIndex(rawIndex: number): number;
|
5436 | /**
|
5437 | * Only support the dimension which inverted index created.
|
5438 | * Do not support other cases until required.
|
5439 | * @param dim concrete dim
|
5440 | * @param value ordinal index
|
5441 | * @return rawIndex
|
5442 | */
|
5443 | rawIndexOf(dim: SeriesDimensionName, value: OrdinalNumber): number;
|
5444 | /**
|
5445 | * Retrieve the index of nearest value
|
5446 | * @param dim
|
5447 | * @param value
|
5448 | * @param [maxDistance=Infinity]
|
5449 | * @return If and only if multiple indices has
|
5450 | * the same value, they are put to the result.
|
5451 | */
|
5452 | indicesOfNearest(dim: DimensionLoose, value: number, maxDistance?: number): number[];
|
5453 | /**
|
5454 | * Data iteration
|
5455 | * @param ctx default this
|
5456 | * @example
|
5457 | * list.each('x', function (x, idx) {});
|
5458 | * list.each(['x', 'y'], function (x, y, idx) {});
|
5459 | * list.each(function (idx) {})
|
5460 | */
|
5461 | each<Ctx>(cb: EachCb0<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
|
5462 | each<Ctx>(dims: DimensionLoose, cb: EachCb1<Ctx>, ctx?: Ctx): void;
|
5463 | each<Ctx>(dims: [DimensionLoose], cb: EachCb1<Ctx>, ctx?: Ctx): void;
|
5464 | each<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: EachCb2<Ctx>, ctx?: Ctx): void;
|
5465 | each<Ctx>(dims: ItrParamDims, cb: EachCb$1<Ctx>, ctx?: Ctx): void;
|
5466 | /**
|
5467 | * Data filter
|
5468 | */
|
5469 | filterSelf<Ctx>(cb: FilterCb0<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): this;
|
5470 | filterSelf<Ctx>(dims: DimensionLoose, cb: FilterCb1<Ctx>, ctx?: Ctx): this;
|
5471 | filterSelf<Ctx>(dims: [DimensionLoose], cb: FilterCb1<Ctx>, ctx?: Ctx): this;
|
5472 | filterSelf<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: FilterCb2<Ctx>, ctx?: Ctx): this;
|
5473 | filterSelf<Ctx>(dims: ItrParamDims, cb: FilterCb$1<Ctx>, ctx?: Ctx): this;
|
5474 | /**
|
5475 | * Select data in range. (For optimization of filter)
|
5476 | * (Manually inline code, support 5 million data filtering in data zoom.)
|
5477 | */
|
5478 | selectRange(range: Record<string, [number, number]>): SeriesData;
|
5479 | /**
|
5480 | * Data mapping to a plain array
|
5481 | */
|
5482 | mapArray<Ctx, Cb extends MapArrayCb0<Ctx>>(cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
|
5483 | mapArray<Ctx, Cb extends MapArrayCb1<Ctx>>(dims: DimensionLoose, cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
|
5484 | mapArray<Ctx, Cb extends MapArrayCb1<Ctx>>(dims: [DimensionLoose], cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
|
5485 | mapArray<Ctx, Cb extends MapArrayCb2<Ctx>>(dims: [DimensionLoose, DimensionLoose], cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
|
5486 | mapArray<Ctx, Cb extends MapArrayCb<Ctx>>(dims: ItrParamDims, cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
|
5487 | /**
|
5488 | * Data mapping to a new List with given dimensions
|
5489 | */
|
5490 | map<Ctx>(dims: DimensionLoose, cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): SeriesData<HostModel>;
|
5491 | map<Ctx>(dims: [DimensionLoose], cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): SeriesData<HostModel>;
|
5492 | map<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: MapCb2<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): SeriesData<HostModel>;
|
5493 | /**
|
5494 | * !!Danger: used on stack dimension only.
|
5495 | */
|
5496 | modify<Ctx>(dims: DimensionLoose, cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
|
5497 | modify<Ctx>(dims: [DimensionLoose], cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
|
5498 | modify<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: MapCb2<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
|
5499 | /**
|
5500 | * Large data down sampling on given dimension
|
5501 | * @param sampleIndex Sample index for name and id
|
5502 | */
|
5503 | downSample(dimension: DimensionLoose, rate: number, sampleValue: (frameValues: ArrayLike$1<ParsedValue>) => ParsedValueNumeric, sampleIndex: (frameValues: ArrayLike$1<ParsedValue>, value: ParsedValueNumeric) => number): SeriesData<HostModel>;
|
5504 | /**
|
5505 | * Large data down sampling using largest-triangle-three-buckets
|
5506 | * @param {string} valueDimension
|
5507 | * @param {number} targetCount
|
5508 | */
|
5509 | lttbDownSample(valueDimension: DimensionLoose, rate: number): SeriesData<HostModel>;
|
5510 | getRawDataItem(idx: number): OptionDataItem;
|
5511 | |
5512 |
|
5513 |
|
5514 | getItemModel<ItemOpts extends unknown = unknown>(idx: number): Model<ItemOpts>;
|
5515 | |
5516 |
|
5517 |
|
5518 | diff(otherList: SeriesData): DataDiffer;
|
5519 | |
5520 |
|
5521 |
|
5522 | getVisual<K extends keyof Visual>(key: K): Visual[K];
|
5523 | |
5524 |
|
5525 |
|
5526 |
|
5527 |
|
5528 |
|
5529 |
|
5530 |
|
5531 |
|
5532 | setVisual<K extends keyof Visual>(key: K, val: Visual[K]): void;
|
5533 | setVisual(kvObj: Partial<Visual>): void;
|
5534 | |
5535 |
|
5536 |
|
5537 | getItemVisual<K extends keyof Visual>(idx: number, key: K): Visual[K];
|
5538 | |
5539 |
|
5540 |
|
5541 | hasItemVisual(): boolean;
|
5542 | |
5543 |
|
5544 |
|
5545 | ensureUniqueItemVisual<K extends keyof Visual>(idx: number, key: K): Visual[K];
|
5546 | |
5547 |
|
5548 |
|
5549 |
|
5550 |
|
5551 |
|
5552 |
|
5553 |
|
5554 |
|
5555 |
|
5556 |
|
5557 |
|
5558 |
|
5559 | setItemVisual<K extends keyof Visual>(idx: number, key: K, value: Visual[K]): void;
|
5560 | setItemVisual(idx: number, kvObject: Partial<Visual>): void;
|
5561 | |
5562 |
|
5563 |
|
5564 | clearAllVisual(): void;
|
5565 | |
5566 |
|
5567 |
|
5568 | setLayout(key: string, val: any): void;
|
5569 | setLayout(kvObj: Dictionary<any>): void;
|
5570 | |
5571 |
|
5572 |
|
5573 | getLayout(key: string): any;
|
5574 | |
5575 |
|
5576 |
|
5577 | getItemLayout(idx: number): any;
|
5578 | |
5579 |
|
5580 |
|
5581 | setItemLayout<M = false>(idx: number, layout: (M extends true ? Dictionary<any> : any), merge?: M): void;
|
5582 | |
5583 |
|
5584 |
|
5585 | clearItemLayouts(): void;
|
5586 | |
5587 |
|
5588 |
|
5589 | setItemGraphicEl(idx: number, el: Element): void;
|
5590 | getItemGraphicEl(idx: number): Element;
|
5591 | eachItemGraphicEl<Ctx = unknown>(cb: (this: Ctx, el: Element, idx: number) => void, context?: Ctx): void;
|
5592 | /**
|
5593 | * Shallow clone a new list except visual and layout properties, and graph elements.
|
5594 | * New list only change the indices.
|
5595 | */
|
5596 | cloneShallow(list?: SeriesData<HostModel>): SeriesData<HostModel>;
|
5597 | /**
|
5598 | * Wrap some method to add more feature
|
5599 | */
|
5600 | wrapMethod(methodName: FunctionPropertyNames<SeriesData>, injectFunction: (...args: any) => any): void;
|
5601 | private static internalField;
|
5602 | }
|
5603 | interface SeriesData {
|
5604 | getLinkedData(dataType?: SeriesDataType): SeriesData;
|
5605 | getLinkedDataAll(): {
|
5606 | data: SeriesData;
|
5607 | type?: SeriesDataType;
|
5608 | }[];
|
5609 | }
|
5610 |
|
5611 | /**
|
5612 | * If string, e.g., 'geo', means {geoIndex: 0}.
|
5613 | * If Object, could contain some of these properties below:
|
5614 | * {
|
5615 | * seriesIndex, seriesId, seriesName,
|
5616 | * geoIndex, geoId, geoName,
|
5617 | * bmapIndex, bmapId, bmapName,
|
5618 | * xAxisIndex, xAxisId, xAxisName,
|
5619 | * yAxisIndex, yAxisId, yAxisName,
|
5620 | * gridIndex, gridId, gridName,
|
5621 | * ... (can be extended)
|
5622 | * }
|
5623 | * Each properties can be number|string|Array.<number>|Array.<string>
|
5624 | * For example, a finder could be
|
5625 | * {
|
5626 | * seriesIndex: 3,
|
5627 | * geoId: ['aa', 'cc'],
|
5628 | * gridName: ['xx', 'rr']
|
5629 | * }
|
5630 | * xxxIndex can be set as 'all' (means all xxx) or 'none' (means not specify)
|
5631 | * If nothing or null/undefined specified, return nothing.
|
5632 | * If both `abcIndex`, `abcId`, `abcName` specified, only one work.
|
5633 | * The priority is: index > id > name, the same with `ecModel.queryComponents`.
|
5634 | */
|
5635 | declare type ModelFinderIndexQuery = number | number[] | 'all' | 'none' | false;
|
5636 | declare type ModelFinderIdQuery = OptionId | OptionId[];
|
5637 | declare type ModelFinderNameQuery = OptionId | OptionId[];
|
5638 | declare type ModelFinder = string | ModelFinderObject;
|
5639 | declare type ModelFinderObject = {
|
5640 | seriesIndex?: ModelFinderIndexQuery;
|
5641 | seriesId?: ModelFinderIdQuery;
|
5642 | seriesName?: ModelFinderNameQuery;
|
5643 | geoIndex?: ModelFinderIndexQuery;
|
5644 | geoId?: ModelFinderIdQuery;
|
5645 | geoName?: ModelFinderNameQuery;
|
5646 | bmapIndex?: ModelFinderIndexQuery;
|
5647 | bmapId?: ModelFinderIdQuery;
|
5648 | bmapName?: ModelFinderNameQuery;
|
5649 | xAxisIndex?: ModelFinderIndexQuery;
|
5650 | xAxisId?: ModelFinderIdQuery;
|
5651 | xAxisName?: ModelFinderNameQuery;
|
5652 | yAxisIndex?: ModelFinderIndexQuery;
|
5653 | yAxisId?: ModelFinderIdQuery;
|
5654 | yAxisName?: ModelFinderNameQuery;
|
5655 | gridIndex?: ModelFinderIndexQuery;
|
5656 | gridId?: ModelFinderIdQuery;
|
5657 | gridName?: ModelFinderNameQuery;
|
5658 | dataIndex?: number;
|
5659 | dataIndexInside?: number;
|
5660 | };
|
5661 | /**
|
5662 | * {
|
5663 | * seriesModels: [seriesModel1, seriesModel2],
|
5664 | * seriesModel: seriesModel1, // The first model
|
5665 | * geoModels: [geoModel1, geoModel2],
|
5666 | * geoModel: geoModel1, // The first model
|
5667 | * ...
|
5668 | * }
|
5669 | */
|
5670 | declare type ParsedModelFinder = {
|
5671 | [key: string]: ComponentModel | ComponentModel[] | undefined;
|
5672 | };
|
5673 | declare type QueryReferringOpt = {
|
5674 | useDefault?: boolean;
|
5675 | enableAll?: boolean;
|
5676 | enableNone?: boolean;
|
5677 | };
|
5678 |
|
5679 | declare class ComponentModel<Opt extends ComponentOption = ComponentOption> extends Model<Opt> {
|
5680 | /**
|
5681 | * @readonly
|
5682 | */
|
5683 | type: ComponentFullType;
|
5684 | /**
|
5685 | * @readonly
|
5686 | */
|
5687 | id: string;
|
5688 | /**
|
5689 | * Because simplified concept is probably better, series.name (or component.name)
|
5690 | * has been having too many responsibilities:
|
5691 | * (1) Generating id (which requires name in option should not be modified).
|
5692 | * (2) As an index to mapping series when merging option or calling API (a name
|
5693 | * can refer to more than one component, which is convenient is some cases).
|
5694 | * (3) Display.
|
5695 | * @readOnly But injected
|
5696 | */
|
5697 | name: string;
|
5698 | /**
|
5699 | * @readOnly
|
5700 | */
|
5701 | mainType: ComponentMainType;
|
5702 | /**
|
5703 | * @readOnly
|
5704 | */
|
5705 | subType: ComponentSubType;
|
5706 | /**
|
5707 | * @readOnly
|
5708 | */
|
5709 | componentIndex: number;
|
5710 | /**
|
5711 | * @readOnly
|
5712 | */
|
5713 | protected defaultOption: ComponentOption;
|
5714 | /**
|
5715 | * @readOnly
|
5716 | */
|
5717 | ecModel: GlobalModel;
|
5718 | /**
|
5719 | * @readOnly
|
5720 | */
|
5721 | static dependencies: string[];
|
5722 | readonly uid: string;
|
5723 | /**
|
5724 | * Support merge layout params.
|
5725 | * Only support 'box' now (left/right/top/bottom/width/height).
|
5726 | */
|
5727 | static layoutMode: ComponentLayoutMode | ComponentLayoutMode['type'];
|
5728 | /**
|
5729 | * Prevent from auto set z, zlevel, z2 by the framework.
|
5730 | */
|
5731 | preventAutoZ: boolean;
|
5732 | __viewId: string;
|
5733 | __requireNewView: boolean;
|
5734 | static protoInitialize: void;
|
5735 | constructor(option: Opt, parentModel: Model, ecModel: GlobalModel);
|
5736 | init(option: Opt, parentModel: Model, ecModel: GlobalModel): void;
|
5737 | mergeDefaultAndTheme(option: Opt, ecModel: GlobalModel): void;
|
5738 | mergeOption(option: Opt, ecModel: GlobalModel): void;
|
5739 | /**
|
5740 | * Called immediately after `init` or `mergeOption` of this instance called.
|
5741 | */
|
5742 | optionUpdated(newCptOption: Opt, isInit: boolean): void;
|
5743 | /**
|
5744 | * [How to declare defaultOption]:
|
5745 | *
|
5746 | * (A) If using class declaration in typescript (since echarts 5):
|
5747 | * ```ts
|
5748 | * import {ComponentOption} from '../model/option.js';
|
5749 | * export interface XxxOption extends ComponentOption {
|
5750 | * aaa: number
|
5751 | * }
|
5752 | * export class XxxModel extends Component {
|
5753 | * static type = 'xxx';
|
5754 | * static defaultOption: XxxOption = {
|
5755 | * aaa: 123
|
5756 | * }
|
5757 | * }
|
5758 | * Component.registerClass(XxxModel);
|
5759 | * ```
|
5760 | * ```ts
|
5761 | * import {inheritDefaultOption} from '../util/component.js';
|
5762 | * import {XxxModel, XxxOption} from './XxxModel.js';
|
5763 | * export interface XxxSubOption extends XxxOption {
|
5764 | * bbb: number
|
5765 | * }
|
5766 | * class XxxSubModel extends XxxModel {
|
5767 | * static defaultOption: XxxSubOption = inheritDefaultOption(XxxModel.defaultOption, {
|
5768 | * bbb: 456
|
5769 | * })
|
5770 | * fn() {
|
5771 | * let opt = this.getDefaultOption();
|
5772 | * // opt is {aaa: 123, bbb: 456}
|
5773 | * }
|
5774 | * }
|
5775 | * ```
|
5776 | *
|
5777 | * (B) If using class extend (previous approach in echarts 3 & 4):
|
5778 | * ```js
|
5779 | * let XxxComponent = Component.extend({
|
5780 | * defaultOption: {
|
5781 | * xx: 123
|
5782 | * }
|
5783 | * })
|
5784 | * ```
|
5785 | * ```js
|
5786 | * let XxxSubComponent = XxxComponent.extend({
|
5787 | * defaultOption: {
|
5788 | * yy: 456
|
5789 | * },
|
5790 | * fn: function () {
|
5791 | * let opt = this.getDefaultOption();
|
5792 | *
|
5793 | * }
|
5794 | * })
|
5795 | * ```
|
5796 | */
|
5797 | getDefaultOption(): Opt;
|
5798 | /**
|
5799 | * Notice: always force to input param `useDefault` in case that forget to consider it.
|
5800 | * The same behavior as `modelUtil.parseFinder`.
|
5801 | *
|
5802 | * @param useDefault In many cases like series refer axis and axis refer grid,
|
5803 | * If axis index / axis id not specified, use the first target as default.
|
5804 | * In other cases like dataZoom refer axis, if not specified, measn no refer.
|
5805 | */
|
5806 | getReferringComponents(mainType: ComponentMainType, opt: QueryReferringOpt): {
|
5807 | models: ComponentModel[];
|
5808 | specified: boolean;
|
5809 | };
|
5810 | getBoxLayoutParams(): {
|
5811 | left: string | number;
|
5812 | top: string | number;
|
5813 | right: string | number;
|
5814 | bottom: string | number;
|
5815 | width: string | number;
|
5816 | height: string | number;
|
5817 | };
|
5818 | /**
|
5819 | * Get key for zlevel.
|
5820 | * If developers don't configure zlevel. We will assign zlevel to series based on the key.
|
5821 | * For example, lines with trail effect and progressive series will in an individual zlevel.
|
5822 | */
|
5823 | getZLevelKey(): string;
|
5824 | setZLevel(zlevel: number): void;
|
5825 | static registerClass: ClassManager['registerClass'];
|
5826 | static hasClass: ClassManager['hasClass'];
|
5827 | static registerSubTypeDefaulter: SubTypeDefaulterManager['registerSubTypeDefaulter'];
|
5828 | }
|
5829 |
|
5830 | declare type AnimateOrSetPropsOption = {
|
5831 | dataIndex?: number;
|
5832 | cb?: () => void;
|
5833 | during?: (percent: number) => void;
|
5834 | removeOpt?: AnimationOption$1;
|
5835 | isFrom?: boolean;
|
5836 | };
|
5837 |
|
5838 |
|
5839 |
|
5840 |
|
5841 |
|
5842 |
|
5843 |
|
5844 |
|
5845 |
|
5846 |
|
5847 |
|
5848 |
|
5849 |
|
5850 |
|
5851 |
|
5852 |
|
5853 | declare function updateProps<Props extends ElementProps>(el: Element<Props>, props: Props, animatableModel?: Model<AnimationOptionMixin>, dataIndex?: AnimateOrSetPropsOption['dataIndex'] | AnimateOrSetPropsOption['cb'] | AnimateOrSetPropsOption, cb?: AnimateOrSetPropsOption['cb'] | AnimateOrSetPropsOption['during'], during?: AnimateOrSetPropsOption['during']): void;
|
5854 |
|
5855 |
|
5856 |
|
5857 |
|
5858 |
|
5859 |
|
5860 |
|
5861 |
|
5862 |
|
5863 | declare function initProps<Props extends ElementProps>(el: Element<Props>, props: Props, animatableModel?: Model<AnimationOptionMixin>, dataIndex?: AnimateOrSetPropsOption['dataIndex'] | AnimateOrSetPropsOption['cb'] | AnimateOrSetPropsOption, cb?: AnimateOrSetPropsOption['cb'] | AnimateOrSetPropsOption['during'], during?: AnimateOrSetPropsOption['during']): void;
|
5864 |
|
5865 | declare type ExtendShapeOpt = Parameters<typeof Path.extend>[0];
|
5866 | declare type ExtendShapeReturn = ReturnType<typeof Path.extend>;
|
5867 |
|
5868 |
|
5869 |
|
5870 | declare function extendShape(opts: ExtendShapeOpt): ExtendShapeReturn;
|
5871 | declare const extendPathFromString: typeof extendFromString;
|
5872 | declare type SVGPathOption$1 = Parameters<typeof extendPathFromString>[1];
|
5873 | declare type SVGPathCtor = ReturnType<typeof extendPathFromString>;
|
5874 | declare type SVGPath$1 = InstanceType<SVGPathCtor>;
|
5875 |
|
5876 |
|
5877 |
|
5878 | declare function extendPath(pathData: string, opts: SVGPathOption$1): SVGPathCtor;
|
5879 |
|
5880 |
|
5881 |
|
5882 |
|
5883 |
|
5884 |
|
5885 |
|
5886 |
|
5887 |
|
5888 |
|
5889 |
|
5890 | declare function registerShape(name: string, ShapeClass: {
|
5891 | new (): Path;
|
5892 | }): void;
|
5893 |
|
5894 |
|
5895 |
|
5896 |
|
5897 |
|
5898 |
|
5899 |
|
5900 |
|
5901 |
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 |
|
5908 |
|
5909 |
|
5910 |
|
5911 |
|
5912 |
|
5913 |
|
5914 |
|
5915 |
|
5916 |
|
5917 |
|
5918 |
|
5919 |
|
5920 | declare function getShapeClass(name: string): {
|
5921 | new (): Path;
|
5922 | };
|
5923 |
|
5924 |
|
5925 |
|
5926 |
|
5927 |
|
5928 |
|
5929 |
|
5930 | declare function makePath(pathData: string, opts: SVGPathOption$1, rect: ZRRectLike, layout?: 'center' | 'cover'): SVGPath$1;
|
5931 |
|
5932 |
|
5933 |
|
5934 |
|
5935 |
|
5936 |
|
5937 |
|
5938 | declare function makeImage(imageUrl: string, rect: ZRRectLike, layout?: 'center' | 'cover'): ZRImage;
|
5939 | declare const mergePath$1: typeof mergePath;
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 |
|
5945 | declare function resizePath(path: SVGPath$1, rect: ZRRectLike): void;
|
5946 |
|
5947 |
|
5948 |
|
5949 |
|
5950 |
|
5951 |
|
5952 |
|
5953 | declare function getTransform(target: Transformable, ancestor?: Transformable): MatrixArray;
|
5954 | declare function clipPointsByRect(points: VectorArray[], rect: ZRRectLike): number[][];
|
5955 |
|
5956 |
|
5957 |
|
5958 | declare function clipRectByRect(targetRect: ZRRectLike, rect: ZRRectLike): ZRRectLike | undefined;
|
5959 | declare function createIcon(iconStr: string,
|
5960 | opt?: Omit<DisplayableProps, 'style'>, rect?: ZRRectLike): SVGPath$1 | ZRImage;
|
5961 |
|
5962 | declare type TextStyleProps$1 = ZRText['style'];
|
5963 | declare function getTextRect(text: TextStyleProps$1['text'], font?: TextStyleProps$1['font'], align?: TextStyleProps$1['align'], verticalAlign?: TextStyleProps$1['verticalAlign'], padding?: TextStyleProps$1['padding'], rich?: TextStyleProps$1['rich'], truncate?: boolean, lineHeight?: number): BoundingRect;
|
5964 |
|
5965 |
|
5966 |
|
5967 |
|
5968 | declare function addCommas(x: string | number): string;
|
5969 | declare function toCamelCase(str: string, upperCaseFirst?: boolean): string;
|
5970 | declare const normalizeCssArray$1: typeof normalizeCssArray;
|
5971 |
|
5972 | interface TplFormatterParam extends Dictionary<any> {
|
5973 | $vars: string[];
|
5974 | }
|
5975 |
|
5976 |
|
5977 |
|
5978 |
|
5979 | declare function formatTpl(tpl: string, paramsList: TplFormatterParam | TplFormatterParam[], encode?: boolean): string;
|
5980 | interface RichTextTooltipMarker {
|
5981 | renderMode: TooltipRenderMode;
|
5982 | content: string;
|
5983 | style: Dictionary<unknown>;
|
5984 | }
|
5985 | declare type TooltipMarker = string | RichTextTooltipMarker;
|
5986 | declare type TooltipMarkerType = 'item' | 'subItem';
|
5987 | interface GetTooltipMarkerOpt {
|
5988 | color?: ColorString;
|
5989 | extraCssText?: string;
|
5990 | type?: TooltipMarkerType;
|
5991 | renderMode?: TooltipRenderMode;
|
5992 | markerId?: string;
|
5993 | }
|
5994 | declare function getTooltipMarker(color: ColorString, extraCssText?: string): TooltipMarker;
|
5995 | declare function getTooltipMarker(opt: GetTooltipMarkerOpt): TooltipMarker;
|
5996 |
|
5997 |
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 |
|
6004 |
|
6005 |
|
6006 | declare function formatTime(tpl: string, value: unknown, isUTC?: boolean): string;
|
6007 |
|
6008 |
|
6009 |
|
6010 |
|
6011 |
|
6012 | declare function capitalFirst(str: string): string;
|
6013 |
|
6014 | interface MapperParamAxisInfo {
|
6015 | axisIndex: number;
|
6016 | axisName: string;
|
6017 | axisId: string;
|
6018 | axisDim: string;
|
6019 | }
|
6020 | interface AxisPointerLink {
|
6021 | xAxisIndex?: number[] | 'all';
|
6022 | yAxisIndex?: number[] | 'all';
|
6023 | xAxisId?: string[];
|
6024 | yAxisId?: string[];
|
6025 | xAxisName?: string[] | string;
|
6026 | yAxisName?: string[] | string;
|
6027 | radiusAxisIndex?: number[] | 'all';
|
6028 | angleAxisIndex?: number[] | 'all';
|
6029 | radiusAxisId?: string[];
|
6030 | angleAxisId?: string[];
|
6031 | radiusAxisName?: string[] | string;
|
6032 | angleAxisName?: string[] | string;
|
6033 | singleAxisIndex?: number[] | 'all';
|
6034 | singleAxisId?: string[];
|
6035 | singleAxisName?: string[] | string;
|
6036 | mapper?(sourceVal: ScaleDataValue, sourceAxisInfo: MapperParamAxisInfo, targetAxisInfo: MapperParamAxisInfo): CommonAxisPointerOption['value'];
|
6037 | }
|
6038 | interface AxisPointerOption extends ComponentOption, Omit<CommonAxisPointerOption, 'type'> {
|
6039 | mainType?: 'axisPointer';
|
6040 | type?: 'line' | 'shadow' | 'cross' | 'none';
|
6041 | link?: AxisPointerLink[];
|
6042 | }
|
6043 |
|
6044 | declare type TopLevelFormatterParams = CallbackDataParams | CallbackDataParams[];
|
6045 | interface TooltipOption extends CommonTooltipOption<TopLevelFormatterParams>, ComponentOption {
|
6046 | mainType?: 'tooltip';
|
6047 | axisPointer?: AxisPointerOption & {
|
6048 | axis?: 'auto' | 'x' | 'y' | 'angle' | 'radius';
|
6049 | crossStyle?: LineStyleOption & {
|
6050 | textStyle?: LabelOption;
|
6051 | };
|
6052 | };
|
6053 | |
6054 |
|
6055 |
|
6056 | showContent?: boolean;
|
6057 | |
6058 |
|
6059 |
|
6060 | trigger?: 'item' | 'axis' | 'none';
|
6061 | displayMode?: 'single' | 'multipleByCoordSys';
|
6062 | |
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 | renderMode?: 'auto' | TooltipRenderMode;
|
6068 | |
6069 |
|
6070 |
|
6071 |
|
6072 | appendToBody?: boolean;
|
6073 | |
6074 |
|
6075 |
|
6076 |
|
6077 | appendTo?: ((chartContainer: HTMLElement) => HTMLElement | undefined | null) | string | HTMLElement;
|
6078 | /**
|
6079 | * Specify the class name of tooltip element
|
6080 | * Only available when renderMode is html
|
6081 | */
|
6082 | className?: string;
|
6083 | order?: TooltipOrderMode;
|
6084 | }
|
6085 |
|
6086 | /**
|
6087 | * This is an abstract layer to insulate the upper usage of tooltip content
|
6088 | * from the different backends according to different `renderMode` ('html' or 'richText').
|
6089 | * With the help of the abstract layer, it does not need to consider how to create and
|
6090 | * assemble html or richText snippets when making tooltip content.
|
6091 | *
|
6092 | * @usage
|
6093 | *
|
6094 | * ```ts
|
6095 | * class XxxSeriesModel {
|
6096 | * formatTooltip(
|
6097 | * dataIndex: number,
|
6098 | * multipleSeries: boolean,
|
6099 | * dataType: string
|
6100 | * ) {
|
6101 | * ...
|
6102 | * return createTooltipMarkup('section', {
|
6103 | * header: header,
|
6104 | * blocks: [
|
6105 | * createTooltipMarkup('nameValue', {
|
6106 | * name: name,
|
6107 | * value: value,
|
6108 | * noValue: value == null
|
6109 | * })
|
6110 | * ]
|
6111 | * });
|
6112 | * }
|
6113 | * }
|
6114 | * ```
|
6115 | */
|
6116 | declare type TooltipMarkupBlockFragment = TooltipMarkupSection | TooltipMarkupNameValueBlock;
|
6117 | interface TooltipMarkupBlock {
|
6118 | sortParam?: unknown;
|
6119 | }
|
6120 | interface TooltipMarkupSection extends TooltipMarkupBlock {
|
6121 | type: 'section';
|
6122 | header?: unknown;
|
6123 | noHeader?: boolean;
|
6124 | blocks?: TooltipMarkupBlockFragment[];
|
6125 | sortBlocks?: boolean;
|
6126 | valueFormatter?: CommonTooltipOption<unknown>['valueFormatter'];
|
6127 | }
|
6128 | interface TooltipMarkupNameValueBlock extends TooltipMarkupBlock {
|
6129 | type: 'nameValue';
|
6130 | markerType?: TooltipMarkerType;
|
6131 | markerColor?: ColorString;
|
6132 | name?: string;
|
6133 | value?: unknown | unknown[];
|
6134 | valueType?: DimensionType | DimensionType[];
|
6135 | noName?: boolean;
|
6136 | noValue?: boolean;
|
6137 | dataIndex?: number;
|
6138 | valueFormatter?: CommonTooltipOption<unknown>['valueFormatter'];
|
6139 | }
|
6140 |
|
6141 | interface DataFormatMixin extends DataHost {
|
6142 | ecModel: GlobalModel;
|
6143 | mainType: ComponentMainType;
|
6144 | subType: ComponentSubType;
|
6145 | componentIndex: number;
|
6146 | id: string;
|
6147 | name: string;
|
6148 | animatedValue: OptionDataValue[];
|
6149 | }
|
6150 | declare class DataFormatMixin {
|
6151 | /**
|
6152 | * Get params for formatter
|
6153 | */
|
6154 | getDataParams(dataIndex: number, dataType?: SeriesDataType): CallbackDataParams;
|
6155 | /**
|
6156 | * Format label
|
6157 | * @param dataIndex
|
6158 | * @param status 'normal' by default
|
6159 | * @param dataType
|
6160 | * @param labelDimIndex Only used in some chart that
|
6161 | * use formatter in different dimensions, like radar.
|
6162 | * @param formatter Formatter given outside.
|
6163 | * @return return null/undefined if no formatter
|
6164 | */
|
6165 | getFormattedLabel(dataIndex: number, status?: DisplayState, dataType?: SeriesDataType, labelDimIndex?: number, formatter?: string | ((params: object) => string), extendParams?: {
|
6166 | interpolatedValue: InterpolatableValue;
|
6167 | }): string;
|
6168 | /**
|
6169 | * Get raw value in option
|
6170 | */
|
6171 | getRawValue(idx: number, dataType?: SeriesDataType): unknown;
|
6172 | /**
|
6173 | * Should be implemented.
|
6174 | * @param {number} dataIndex
|
6175 | * @param {boolean} [multipleSeries=false]
|
6176 | * @param {string} [dataType]
|
6177 | */
|
6178 | formatTooltip(dataIndex: number, multipleSeries?: boolean, dataType?: string): TooltipFormatResult;
|
6179 | }
|
6180 | declare type TooltipFormatResult = string | TooltipMarkupBlockFragment;
|
6181 |
|
6182 | /**
|
6183 | * [Notice]:
|
6184 | * Consider custom bundle on demand, chart specified
|
6185 | * or component specified types and constants should
|
6186 | * not put here. Only common types and constants can
|
6187 | * be put in this file.
|
6188 | */
|
6189 |
|
6190 | declare type RendererType = 'canvas' | 'svg';
|
6191 | declare type LayoutOrient = 'vertical' | 'horizontal';
|
6192 | declare type HorizontalAlign = 'left' | 'center' | 'right';
|
6193 | declare type VerticalAlign = 'top' | 'middle' | 'bottom';
|
6194 | declare type ColorString = string;
|
6195 | declare type ZRColor = ColorString | LinearGradientObject | RadialGradientObject | PatternObject;
|
6196 | declare type ZRLineType = 'solid' | 'dotted' | 'dashed' | number | number[];
|
6197 | declare type ZRFontStyle = 'normal' | 'italic' | 'oblique';
|
6198 | declare type ZRFontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | number;
|
6199 | declare type ZREasing = AnimationEasing;
|
6200 | declare type ZRTextAlign = TextAlign;
|
6201 | declare type ZRTextVerticalAlign = TextVerticalAlign;
|
6202 | declare type ZRRectLike = RectLike;
|
6203 | declare type ZRStyleProps = PathStyleProps | ImageStyleProps | TSpanStyleProps | TextStyleProps;
|
6204 | declare type ZRElementEventName = ElementEventName | 'globalout';
|
6205 | declare type ComponentFullType = string;
|
6206 | declare type ComponentMainType = keyof ECUnitOption & string;
|
6207 | declare type ComponentSubType = Exclude<ComponentOption['type'], undefined>;
|
6208 | interface DataHost {
|
6209 | getData(dataType?: SeriesDataType): SeriesData;
|
6210 | }
|
6211 | interface DataModel extends Model<unknown>, DataHost, DataFormatMixin {
|
6212 | getDataParams(dataIndex: number, dataType?: SeriesDataType, el?: Element): CallbackDataParams;
|
6213 | }
|
6214 | interface PayloadItem {
|
6215 | excludeSeriesId?: OptionId | OptionId[];
|
6216 | animation?: PayloadAnimationPart;
|
6217 | [other: string]: any;
|
6218 | }
|
6219 | interface Payload extends PayloadItem {
|
6220 | type: string;
|
6221 | escapeConnect?: boolean;
|
6222 | batch?: PayloadItem[];
|
6223 | }
|
6224 | interface HighlightPayload extends Payload {
|
6225 | type: 'highlight';
|
6226 | notBlur?: boolean;
|
6227 | }
|
6228 | interface DownplayPayload extends Payload {
|
6229 | type: 'downplay';
|
6230 | notBlur?: boolean;
|
6231 | }
|
6232 | interface PayloadAnimationPart {
|
6233 | duration?: number;
|
6234 | easing?: AnimationEasing;
|
6235 | delay?: number;
|
6236 | }
|
6237 | interface SelectChangedPayload extends Payload {
|
6238 | type: 'selectchanged';
|
6239 | escapeConnect: boolean;
|
6240 | isFromClick: boolean;
|
6241 | fromAction: 'select' | 'unselect' | 'toggleSelected';
|
6242 | fromActionPayload: Payload;
|
6243 | selected: {
|
6244 | seriesIndex: number;
|
6245 | dataType?: SeriesDataType;
|
6246 | dataIndex: number[];
|
6247 | }[];
|
6248 | }
|
6249 | interface ViewRootGroup extends Group {
|
6250 | __ecComponentInfo?: {
|
6251 | mainType: string;
|
6252 | index: number;
|
6253 | };
|
6254 | }
|
6255 | interface ECElementEvent extends ECEventData, CallbackDataParams {
|
6256 | type: ZRElementEventName;
|
6257 | event?: ElementEvent;
|
6258 | }
|
6259 | /**
|
6260 | * The echarts event type to user.
|
6261 | * Also known as packedEvent.
|
6262 | */
|
6263 | interface ECActionEvent extends ECEventData {
|
6264 | type: string;
|
6265 | componentType?: string;
|
6266 | componentIndex?: number;
|
6267 | seriesIndex?: number;
|
6268 | escapeConnect?: boolean;
|
6269 | batch?: ECEventData;
|
6270 | }
|
6271 | interface ECEventData {
|
6272 | [key: string]: any;
|
6273 | }
|
6274 | interface EventQueryItem {
|
6275 | [key: string]: any;
|
6276 | }
|
6277 | interface ActionInfo {
|
6278 | type: string;
|
6279 | event?: string;
|
6280 | update?: string;
|
6281 | }
|
6282 | interface ActionHandler {
|
6283 | (payload: Payload, ecModel: GlobalModel, api: ExtensionAPI): void | ECEventData;
|
6284 | }
|
6285 | interface OptionPreprocessor {
|
6286 | (option: ECUnitOption, isTheme: boolean): void;
|
6287 | }
|
6288 | interface PostUpdater {
|
6289 | (ecModel: GlobalModel, api: ExtensionAPI): void;
|
6290 | }
|
6291 | interface StageHandlerReset {
|
6292 | (seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload?: Payload): StageHandlerProgressExecutor | StageHandlerProgressExecutor[] | void;
|
6293 | }
|
6294 | interface StageHandlerOverallReset {
|
6295 | (ecModel: GlobalModel, api: ExtensionAPI, payload?: Payload): void;
|
6296 | }
|
6297 | interface StageHandler {
|
6298 | /**
|
6299 | * Indicate that the task will be piped all series
|
6300 | * (`performRawSeries` indicate whether includes filtered series).
|
6301 | */
|
6302 | createOnAllSeries?: boolean;
|
6303 | /**
|
6304 | * Indicate that the task will be only piped in the pipeline of this type of series.
|
6305 | * (`performRawSeries` indicate whether includes filtered series).
|
6306 | */
|
6307 | seriesType?: string;
|
6308 | /**
|
6309 | * Indicate that the task will be only piped in the pipeline of the returned series.
|
6310 | */
|
6311 | getTargetSeries?: (ecModel: GlobalModel, api: ExtensionAPI) => HashMap<SeriesModel>;
|
6312 | |
6313 |
|
6314 |
|
6315 | performRawSeries?: boolean;
|
6316 | |
6317 |
|
6318 |
|
6319 | plan?: StageHandlerPlan;
|
6320 | |
6321 |
|
6322 |
|
6323 |
|
6324 |
|
6325 |
|
6326 |
|
6327 | overallReset?: StageHandlerOverallReset;
|
6328 | |
6329 |
|
6330 |
|
6331 | reset?: StageHandlerReset;
|
6332 | }
|
6333 | interface StageHandlerInternal extends StageHandler {
|
6334 | uid: string;
|
6335 | visualType?: 'layout' | 'visual';
|
6336 | __prio: number;
|
6337 | __raw: StageHandler | StageHandlerOverallReset;
|
6338 | isVisual?: boolean;
|
6339 | isLayout?: boolean;
|
6340 | }
|
6341 | declare type StageHandlerProgressParams = TaskProgressParams;
|
6342 | interface StageHandlerProgressExecutor {
|
6343 | dataEach?: (data: SeriesData, idx: number) => void;
|
6344 | progress?: (params: StageHandlerProgressParams, data: SeriesData) => void;
|
6345 | }
|
6346 | declare type StageHandlerPlanReturn = TaskPlanCallbackReturn;
|
6347 | interface StageHandlerPlan {
|
6348 | (seriesModel: SeriesModel, ecModel: GlobalModel, api: ExtensionAPI, payload?: Payload): StageHandlerPlanReturn;
|
6349 | }
|
6350 | interface LoadingEffectCreator {
|
6351 | (api: ExtensionAPI, cfg: object): LoadingEffect;
|
6352 | }
|
6353 | interface LoadingEffect extends Element {
|
6354 | resize: () => void;
|
6355 | }
|
6356 |
|
6357 |
|
6358 |
|
6359 |
|
6360 |
|
6361 |
|
6362 | declare type TooltipRenderMode = 'html' | 'richText';
|
6363 | declare type TooltipOrderMode = 'valueAsc' | 'valueDesc' | 'seriesAsc' | 'seriesDesc';
|
6364 | declare type OrdinalRawValue = string | number;
|
6365 | declare type OrdinalNumber = number;
|
6366 |
|
6367 |
|
6368 |
|
6369 |
|
6370 |
|
6371 |
|
6372 |
|
6373 |
|
6374 | declare type OrdinalSortInfo = {
|
6375 | ordinalNumbers: OrdinalNumber[];
|
6376 | };
|
6377 |
|
6378 |
|
6379 |
|
6380 |
|
6381 |
|
6382 |
|
6383 |
|
6384 |
|
6385 |
|
6386 | declare type ParsedValue = ParsedValueNumeric | OrdinalRawValue;
|
6387 | declare type ParsedValueNumeric = number | OrdinalNumber;
|
6388 |
|
6389 |
|
6390 |
|
6391 |
|
6392 |
|
6393 |
|
6394 |
|
6395 | declare type ScaleDataValue = ParsedValueNumeric | OrdinalRawValue | Date;
|
6396 | interface ScaleTick {
|
6397 | level?: number;
|
6398 | value: number;
|
6399 | }
|
6400 | declare type DimensionIndex = number;
|
6401 | declare type DimensionIndexLoose = DimensionIndex | string;
|
6402 | declare type DimensionName = string;
|
6403 | declare type DimensionLoose = DimensionName | DimensionIndexLoose;
|
6404 | declare type DimensionType = DataStoreDimensionType;
|
6405 | interface DataVisualDimensions {
|
6406 | tooltip?: DimensionIndex | false;
|
6407 | label?: DimensionIndex;
|
6408 | itemName?: DimensionIndex;
|
6409 | itemId?: DimensionIndex;
|
6410 | itemGroupId?: DimensionIndex;
|
6411 | itemChildGroupId?: DimensionIndex;
|
6412 | seriesName?: DimensionIndex;
|
6413 | }
|
6414 | declare type DimensionDefinition = {
|
6415 | type?: DataStoreDimensionType;
|
6416 | name?: DimensionName;
|
6417 | displayName?: string;
|
6418 | };
|
6419 | declare type DimensionDefinitionLoose = DimensionDefinition['name'] | DimensionDefinition;
|
6420 | declare const SOURCE_FORMAT_ORIGINAL: "original";
|
6421 | declare const SOURCE_FORMAT_ARRAY_ROWS: "arrayRows";
|
6422 | declare const SOURCE_FORMAT_OBJECT_ROWS: "objectRows";
|
6423 | declare const SOURCE_FORMAT_KEYED_COLUMNS: "keyedColumns";
|
6424 | declare const SOURCE_FORMAT_TYPED_ARRAY: "typedArray";
|
6425 | declare const SOURCE_FORMAT_UNKNOWN: "unknown";
|
6426 | declare type SourceFormat = typeof SOURCE_FORMAT_ORIGINAL | typeof SOURCE_FORMAT_ARRAY_ROWS | typeof SOURCE_FORMAT_OBJECT_ROWS | typeof SOURCE_FORMAT_KEYED_COLUMNS | typeof SOURCE_FORMAT_TYPED_ARRAY | typeof SOURCE_FORMAT_UNKNOWN;
|
6427 | declare const SERIES_LAYOUT_BY_COLUMN: "column";
|
6428 | declare const SERIES_LAYOUT_BY_ROW: "row";
|
6429 | declare type SeriesLayoutBy = typeof SERIES_LAYOUT_BY_COLUMN | typeof SERIES_LAYOUT_BY_ROW;
|
6430 | declare type OptionSourceHeader = boolean | 'auto' | number;
|
6431 | declare type SeriesDataType = 'main' | 'node' | 'edge';
|
6432 |
|
6433 |
|
6434 |
|
6435 |
|
6436 |
|
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 |
|
6444 |
|
6445 |
|
6446 |
|
6447 |
|
6448 |
|
6449 |
|
6450 |
|
6451 |
|
6452 |
|
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 |
|
6460 |
|
6461 |
|
6462 |
|
6463 |
|
6464 |
|
6465 | declare type ECUnitOption = {
|
6466 | baseOption?: unknown;
|
6467 | options?: unknown;
|
6468 | media?: unknown;
|
6469 | timeline?: ComponentOption | ComponentOption[];
|
6470 | backgroundColor?: ZRColor;
|
6471 | darkMode?: boolean | 'auto';
|
6472 | textStyle?: Pick<LabelOption, 'color' | 'fontStyle' | 'fontWeight' | 'fontSize' | 'fontFamily'>;
|
6473 | useUTC?: boolean;
|
6474 | [key: string]: ComponentOption | ComponentOption[] | Dictionary<unknown> | unknown;
|
6475 | stateAnimation?: AnimationOption$1;
|
6476 | } & AnimationOptionMixin & ColorPaletteOptionMixin;
|
6477 |
|
6478 |
|
6479 |
|
6480 |
|
6481 |
|
6482 |
|
6483 |
|
6484 |
|
6485 |
|
6486 |
|
6487 |
|
6488 |
|
6489 |
|
6490 |
|
6491 |
|
6492 |
|
6493 |
|
6494 |
|
6495 |
|
6496 |
|
6497 |
|
6498 |
|
6499 |
|
6500 |
|
6501 |
|
6502 |
|
6503 |
|
6504 |
|
6505 |
|
6506 |
|
6507 |
|
6508 |
|
6509 |
|
6510 |
|
6511 |
|
6512 |
|
6513 |
|
6514 |
|
6515 |
|
6516 | interface ECBasicOption extends ECUnitOption {
|
6517 | baseOption?: ECUnitOption;
|
6518 | timeline?: ComponentOption | ComponentOption[];
|
6519 | options?: ECUnitOption[];
|
6520 | media?: MediaUnit[];
|
6521 | }
|
6522 | declare type OptionSourceData<VAL extends OptionDataValue = OptionDataValue, ORIITEM extends OptionDataItemOriginal<VAL> = OptionDataItemOriginal<VAL>> = OptionSourceDataOriginal<VAL, ORIITEM> | OptionSourceDataObjectRows<VAL> | OptionSourceDataArrayRows<VAL> | OptionSourceDataKeyedColumns<VAL> | OptionSourceDataTypedArray;
|
6523 | declare type OptionDataItemOriginal<VAL extends OptionDataValue = OptionDataValue> = VAL | VAL[] | OptionDataItemObject<VAL>;
|
6524 | declare type OptionSourceDataOriginal<VAL extends OptionDataValue = OptionDataValue, ORIITEM extends OptionDataItemOriginal<VAL> = OptionDataItemOriginal<VAL>> = ArrayLike<ORIITEM>;
|
6525 | declare type OptionSourceDataObjectRows<VAL extends OptionDataValue = OptionDataValue> = Array<Dictionary<VAL>>;
|
6526 | declare type OptionSourceDataArrayRows<VAL extends OptionDataValue = OptionDataValue> = Array<Array<VAL>>;
|
6527 | declare type OptionSourceDataKeyedColumns<VAL extends OptionDataValue = OptionDataValue> = Dictionary<ArrayLike<VAL>>;
|
6528 | declare type OptionSourceDataTypedArray = ArrayLike<number>;
|
6529 | declare type OptionDataItem = OptionDataValue | Dictionary<OptionDataValue> | OptionDataValue[] | OptionDataItemObject<OptionDataValue>;
|
6530 | declare type OptionDataItemObject<T> = {
|
6531 | id?: OptionId;
|
6532 | name?: OptionName;
|
6533 | groupId?: OptionId;
|
6534 | childGroupId?: OptionId;
|
6535 | value?: T[] | T;
|
6536 | selected?: boolean;
|
6537 | };
|
6538 | declare type OptionId = string | number;
|
6539 | declare type OptionName = string | number;
|
6540 | interface GraphEdgeItemObject<VAL extends OptionDataValue> extends OptionDataItemObject<VAL> {
|
6541 | |
6542 |
|
6543 |
|
6544 | source?: string | number;
|
6545 | |
6546 |
|
6547 |
|
6548 | target?: string | number;
|
6549 | }
|
6550 | declare type OptionDataValue = string | number | Date | null | undefined;
|
6551 | declare type OptionDataValueNumeric = number | '-';
|
6552 | declare type OptionDataValueDate = Date | string | number;
|
6553 | declare type ModelOption = any;
|
6554 | declare type ThemeOption = Dictionary<any>;
|
6555 | declare type DisplayState = 'normal' | 'emphasis' | 'blur' | 'select';
|
6556 | interface OptionEncodeVisualDimensions {
|
6557 | tooltip?: OptionEncodeValue;
|
6558 | label?: OptionEncodeValue;
|
6559 | itemName?: OptionEncodeValue;
|
6560 | itemId?: OptionEncodeValue;
|
6561 | seriesName?: OptionEncodeValue;
|
6562 | itemGroupId?: OptionEncodeValue;
|
6563 | childGroupdId?: OptionEncodeValue;
|
6564 | }
|
6565 | interface OptionEncode extends OptionEncodeVisualDimensions {
|
6566 | [coordDim: string]: OptionEncodeValue | undefined;
|
6567 | }
|
6568 | declare type OptionEncodeValue = DimensionLoose | DimensionLoose[];
|
6569 | declare type EncodeDefaulter = (source: Source, dimCount: number) => OptionEncode;
|
6570 | interface CallbackDataParams {
|
6571 | componentType: string;
|
6572 | componentSubType: string;
|
6573 | componentIndex: number;
|
6574 | seriesType?: string;
|
6575 | seriesIndex?: number;
|
6576 | seriesId?: string;
|
6577 | seriesName?: string;
|
6578 | name: string;
|
6579 | dataIndex: number;
|
6580 | data: OptionDataItem;
|
6581 | dataType?: SeriesDataType;
|
6582 | value: OptionDataItem | OptionDataValue;
|
6583 | color?: ZRColor;
|
6584 | borderColor?: string;
|
6585 | dimensionNames?: DimensionName[];
|
6586 | encode?: DimensionUserOuputEncode;
|
6587 | marker?: TooltipMarker;
|
6588 | status?: DisplayState;
|
6589 | dimensionIndex?: number;
|
6590 | percent?: number;
|
6591 | $vars: string[];
|
6592 | }
|
6593 | declare type InterpolatableValue = ParsedValue | ParsedValue[];
|
6594 | declare type DecalDashArrayX = number | (number | number[])[];
|
6595 | declare type DecalDashArrayY = number | number[];
|
6596 | interface DecalObject {
|
6597 | symbol?: string | string[];
|
6598 | symbolSize?: number;
|
6599 | symbolKeepAspect?: boolean;
|
6600 | color?: string;
|
6601 | backgroundColor?: string;
|
6602 | dashArrayX?: DecalDashArrayX;
|
6603 | dashArrayY?: DecalDashArrayY;
|
6604 | rotation?: number;
|
6605 | maxTileWidth?: number;
|
6606 | maxTileHeight?: number;
|
6607 | }
|
6608 | interface MediaQuery {
|
6609 | minWidth?: number;
|
6610 | maxWidth?: number;
|
6611 | minHeight?: number;
|
6612 | maxHeight?: number;
|
6613 | minAspectRatio?: number;
|
6614 | maxAspectRatio?: number;
|
6615 | }
|
6616 | declare type MediaUnit = {
|
6617 | query?: MediaQuery;
|
6618 | option: ECUnitOption;
|
6619 | };
|
6620 | declare type ComponentLayoutMode = {
|
6621 | type?: 'box';
|
6622 | ignoreSize?: boolean | boolean[];
|
6623 | };
|
6624 | declare type PaletteOptionMixin = ColorPaletteOptionMixin;
|
6625 | interface ColorPaletteOptionMixin {
|
6626 | color?: ZRColor | ZRColor[];
|
6627 | colorLayer?: ZRColor[][];
|
6628 | }
|
6629 |
|
6630 |
|
6631 |
|
6632 | interface BoxLayoutOptionMixin {
|
6633 | width?: number | string;
|
6634 | height?: number | string;
|
6635 | top?: number | string;
|
6636 | right?: number | string;
|
6637 | bottom?: number | string;
|
6638 | left?: number | string;
|
6639 | }
|
6640 | interface CircleLayoutOptionMixin {
|
6641 | center?: (number | string)[];
|
6642 | radius?: (number | string)[] | number | string;
|
6643 | }
|
6644 | interface ShadowOptionMixin {
|
6645 | shadowBlur?: number;
|
6646 | shadowColor?: ColorString;
|
6647 | shadowOffsetX?: number;
|
6648 | shadowOffsetY?: number;
|
6649 | }
|
6650 | interface BorderOptionMixin {
|
6651 | borderColor?: ZRColor;
|
6652 | borderWidth?: number;
|
6653 | borderType?: ZRLineType;
|
6654 | borderCap?: CanvasLineCap;
|
6655 | borderJoin?: CanvasLineJoin;
|
6656 | borderDashOffset?: number;
|
6657 | borderMiterLimit?: number;
|
6658 | }
|
6659 | declare type ColorBy = 'series' | 'data';
|
6660 | interface SunburstColorByMixin {
|
6661 | colorBy?: ColorBy;
|
6662 | }
|
6663 | declare type AnimationDelayCallbackParam = {
|
6664 | count: number;
|
6665 | index: number;
|
6666 | };
|
6667 | declare type AnimationDurationCallback = (idx: number) => number;
|
6668 | declare type AnimationDelayCallback = (idx: number, params?: AnimationDelayCallbackParam) => number;
|
6669 | interface AnimationOption$1 {
|
6670 | duration?: number;
|
6671 | easing?: AnimationEasing;
|
6672 | delay?: number;
|
6673 | }
|
6674 |
|
6675 |
|
6676 |
|
6677 | interface AnimationOptionMixin {
|
6678 | |
6679 |
|
6680 |
|
6681 | animation?: boolean;
|
6682 | |
6683 |
|
6684 |
|
6685 | animationThreshold?: number;
|
6686 | |
6687 |
|
6688 |
|
6689 |
|
6690 | animationDuration?: number | AnimationDurationCallback;
|
6691 | |
6692 |
|
6693 |
|
6694 | animationEasing?: AnimationEasing;
|
6695 | |
6696 |
|
6697 |
|
6698 |
|
6699 | animationDelay?: number | AnimationDelayCallback;
|
6700 | |
6701 |
|
6702 |
|
6703 |
|
6704 | animationDurationUpdate?: number | AnimationDurationCallback;
|
6705 | |
6706 |
|
6707 |
|
6708 | animationEasingUpdate?: AnimationEasing;
|
6709 | |
6710 |
|
6711 |
|
6712 |
|
6713 | animationDelayUpdate?: number | AnimationDelayCallback;
|
6714 | }
|
6715 | interface RoamOptionMixin {
|
6716 | |
6717 |
|
6718 |
|
6719 | roam?: boolean | 'pan' | 'move' | 'zoom' | 'scale';
|
6720 | |
6721 |
|
6722 |
|
6723 | center?: (number | string)[];
|
6724 | |
6725 |
|
6726 |
|
6727 | zoom?: number;
|
6728 | scaleLimit?: {
|
6729 | min?: number;
|
6730 | max?: number;
|
6731 | };
|
6732 | }
|
6733 | declare type SymbolSizeCallback<T> = (rawValue: any, params: T) => number | number[];
|
6734 | declare type SymbolCallback<T> = (rawValue: any, params: T) => string;
|
6735 | declare type SymbolRotateCallback<T> = (rawValue: any, params: T) => number;
|
6736 | declare type SymbolOffsetCallback<T> = (rawValue: any, params: T) => string | number | (string | number)[];
|
6737 |
|
6738 |
|
6739 |
|
6740 |
|
6741 | interface SymbolOptionMixin<T = never> {
|
6742 | |
6743 |
|
6744 |
|
6745 | symbol?: string | (T extends never ? never : SymbolCallback<T>);
|
6746 | |
6747 |
|
6748 |
|
6749 | symbolSize?: number | number[] | (T extends never ? never : SymbolSizeCallback<T>);
|
6750 | symbolRotate?: number | (T extends never ? never : SymbolRotateCallback<T>);
|
6751 | symbolKeepAspect?: boolean;
|
6752 | symbolOffset?: string | number | (string | number)[] | (T extends never ? never : SymbolOffsetCallback<T>);
|
6753 | }
|
6754 |
|
6755 |
|
6756 |
|
6757 |
|
6758 | interface ItemStyleOption<TCbParams = never> extends ShadowOptionMixin, BorderOptionMixin {
|
6759 | color?: ZRColor | (TCbParams extends never ? never : ((params: TCbParams) => ZRColor));
|
6760 | opacity?: number;
|
6761 | decal?: DecalObject | 'none';
|
6762 | borderRadius?: (number | string)[] | number | string;
|
6763 | }
|
6764 | /**
|
6765 | * ItemStyleOption is a option set to control styles on lines.
|
6766 | * Used in the components or series like `line`, `axis`
|
6767 | * It includes stroke style.
|
6768 | */
|
6769 | interface LineStyleOption<Clr = ZRColor> extends ShadowOptionMixin {
|
6770 | width?: number;
|
6771 | color?: Clr;
|
6772 | opacity?: number;
|
6773 | type?: ZRLineType;
|
6774 | cap?: CanvasLineCap;
|
6775 | join?: CanvasLineJoin;
|
6776 | dashOffset?: number;
|
6777 | miterLimit?: number;
|
6778 | }
|
6779 | /**
|
6780 | * ItemStyleOption is a option set to control styles on an area, like polygon, rectangle.
|
6781 | * It only include fill style.
|
6782 | */
|
6783 | interface AreaStyleOption<Clr = ZRColor> extends ShadowOptionMixin {
|
6784 | color?: Clr;
|
6785 | opacity?: number;
|
6786 | }
|
6787 | interface VisualOptionUnit {
|
6788 | symbol?: string;
|
6789 | symbolSize?: number;
|
6790 | color?: ColorString;
|
6791 | colorAlpha?: number;
|
6792 | opacity?: number;
|
6793 | colorLightness?: number;
|
6794 | colorSaturation?: number;
|
6795 | colorHue?: number;
|
6796 | decal?: DecalObject;
|
6797 | liftZ?: number;
|
6798 | }
|
6799 | declare type VisualOptionFixed = VisualOptionUnit;
|
6800 | /**
|
6801 | * Option about visual properties used in piecewise mapping
|
6802 | * Used in each piece.
|
6803 | */
|
6804 | declare type VisualOptionPiecewise = VisualOptionUnit;
|
6805 | /**
|
6806 | * All visual properties can be encoded.
|
6807 | */
|
6808 | declare type BuiltinVisualProperty = keyof VisualOptionUnit;
|
6809 | interface TextCommonOption extends ShadowOptionMixin {
|
6810 | color?: string;
|
6811 | fontStyle?: ZRFontStyle;
|
6812 | fontWeight?: ZRFontWeight;
|
6813 | fontFamily?: string;
|
6814 | fontSize?: number | string;
|
6815 | align?: HorizontalAlign;
|
6816 | verticalAlign?: VerticalAlign;
|
6817 | baseline?: VerticalAlign;
|
6818 | opacity?: number;
|
6819 | lineHeight?: number;
|
6820 | backgroundColor?: ColorString | {
|
6821 | image: ImageLike | string;
|
6822 | };
|
6823 | borderColor?: string;
|
6824 | borderWidth?: number;
|
6825 | borderType?: ZRLineType;
|
6826 | borderDashOffset?: number;
|
6827 | borderRadius?: number | number[];
|
6828 | padding?: number | number[];
|
6829 | width?: number | string;
|
6830 | height?: number;
|
6831 | textBorderColor?: string;
|
6832 | textBorderWidth?: number;
|
6833 | textBorderType?: ZRLineType;
|
6834 | textBorderDashOffset?: number;
|
6835 | textShadowBlur?: number;
|
6836 | textShadowColor?: string;
|
6837 | textShadowOffsetX?: number;
|
6838 | textShadowOffsetY?: number;
|
6839 | tag?: string;
|
6840 | }
|
6841 | interface LabelFormatterCallback<T = CallbackDataParams> {
|
6842 | (params: T): string;
|
6843 | }
|
6844 | /**
|
6845 | * LabelOption is an option set to control the style of labels.
|
6846 | * Include color, background, shadow, truncate, rotation, distance, etc..
|
6847 | */
|
6848 | interface LabelOption extends TextCommonOption {
|
6849 | /**
|
6850 | * If show label
|
6851 | */
|
6852 | show?: boolean;
|
6853 | position?: ElementTextConfig['position'];
|
6854 | distance?: number;
|
6855 | rotate?: number;
|
6856 | offset?: number[];
|
6857 | /**
|
6858 | * Min margin between labels. Used when label has layout.
|
6859 | */
|
6860 | minMargin?: number;
|
6861 | overflow?: TextStyleProps['overflow'];
|
6862 | ellipsis?: TextStyleProps['ellipsis'];
|
6863 | silent?: boolean;
|
6864 | precision?: number | 'auto';
|
6865 | valueAnimation?: boolean;
|
6866 | rich?: Dictionary<TextCommonOption>;
|
6867 | }
|
6868 | interface SeriesLabelOption<T extends CallbackDataParams = CallbackDataParams> extends LabelOption {
|
6869 | formatter?: string | LabelFormatterCallback<T>;
|
6870 | }
|
6871 | /**
|
6872 | * Option for labels on line, like markLine, lines
|
6873 | */
|
6874 | interface LineLabelOption extends Omit<LabelOption, 'distance' | 'position'> {
|
6875 | position?: 'start' | 'middle' | 'end' | 'insideStart' | 'insideStartTop' | 'insideStartBottom' | 'insideMiddle' | 'insideMiddleTop' | 'insideMiddleBottom' | 'insideEnd' | 'insideEndTop' | 'insideEndBottom' | 'insideMiddleBottom';
|
6876 | /**
|
6877 | * Distance can be an array.
|
6878 | * Which will specify horizontal and vertical distance respectively
|
6879 | */
|
6880 | distance?: number | number[];
|
6881 | }
|
6882 | interface LabelLineOption {
|
6883 | show?: boolean;
|
6884 | /**
|
6885 | * If displayed above other elements
|
6886 | */
|
6887 | showAbove?: boolean;
|
6888 | length?: number;
|
6889 | length2?: number;
|
6890 | smooth?: boolean | number;
|
6891 | minTurnAngle?: number;
|
6892 | lineStyle?: LineStyleOption;
|
6893 | }
|
6894 | interface SeriesLineLabelOption extends LineLabelOption {
|
6895 | formatter?: string | LabelFormatterCallback<CallbackDataParams>;
|
6896 | }
|
6897 | interface LabelLayoutOptionCallbackParams {
|
6898 | /**
|
6899 | * Index of data which the label represents.
|
6900 | * It can be null if label doesn't represent any data.
|
6901 | */
|
6902 | dataIndex?: number;
|
6903 | /**
|
6904 | * Type of data which the label represents.
|
6905 | * It can be null if label doesn't represent any data.
|
6906 | */
|
6907 | dataType?: SeriesDataType;
|
6908 | seriesIndex: number;
|
6909 | text: string;
|
6910 | align: ZRTextAlign;
|
6911 | verticalAlign: ZRTextVerticalAlign;
|
6912 | rect: RectLike;
|
6913 | labelRect: RectLike;
|
6914 | labelLinePoints?: number[][];
|
6915 | }
|
6916 | interface LabelLayoutOption {
|
6917 | /**
|
6918 | * If move the overlapped label. If label is still overlapped after moved.
|
6919 | * It will determine if to hide this label with `hideOverlap` policy.
|
6920 | *
|
6921 | * shiftX/Y will keep the order on x/y
|
6922 | * shuffleX/y will move the label around the original position randomly.
|
6923 | */
|
6924 | moveOverlap?: 'shiftX' | 'shiftY' | 'shuffleX' | 'shuffleY';
|
6925 | /**
|
6926 | * If hide the overlapped label. It will be handled after move.
|
6927 | * @default 'none'
|
6928 | */
|
6929 | hideOverlap?: boolean;
|
6930 | /**
|
6931 | * If label is draggable.
|
6932 | */
|
6933 | draggable?: boolean;
|
6934 | /**
|
6935 | * Can be absolute px number or percent string.
|
6936 | */
|
6937 | x?: number | string;
|
6938 | y?: number | string;
|
6939 | /**
|
6940 | * offset on x based on the original position.
|
6941 | */
|
6942 | dx?: number;
|
6943 | /**
|
6944 | * offset on y based on the original position.
|
6945 | */
|
6946 | dy?: number;
|
6947 | rotate?: number;
|
6948 | align?: ZRTextAlign;
|
6949 | verticalAlign?: ZRTextVerticalAlign;
|
6950 | width?: number;
|
6951 | height?: number;
|
6952 | fontSize?: number;
|
6953 | labelLinePoints?: number[][];
|
6954 | }
|
6955 | declare type LabelLayoutOptionCallback = (params: LabelLayoutOptionCallbackParams) => LabelLayoutOption;
|
6956 | interface TooltipFormatterCallback<T> {
|
6957 | |
6958 |
|
6959 |
|
6960 |
|
6961 | (params: T, asyncTicket: string): string | HTMLElement | HTMLElement[];
|
6962 | |
6963 |
|
6964 |
|
6965 |
|
6966 | (params: T, asyncTicket: string, callback: (cbTicket: string, htmlOrDomNodes: string | HTMLElement | HTMLElement[]) => void): string | HTMLElement | HTMLElement[];
|
6967 | }
|
6968 | declare type TooltipBuiltinPosition = 'inside' | 'top' | 'left' | 'right' | 'bottom';
|
6969 | declare type TooltipBoxLayoutOption = Pick<BoxLayoutOptionMixin, 'top' | 'left' | 'right' | 'bottom'>;
|
6970 | declare type TooltipPositionCallbackParams = CallbackDataParams | CallbackDataParams[];
|
6971 |
|
6972 |
|
6973 |
|
6974 | interface TooltipPositionCallback {
|
6975 | (point: [number, number],
|
6976 | |
6977 |
|
6978 |
|
6979 | params: TooltipPositionCallbackParams,
|
6980 | |
6981 |
|
6982 |
|
6983 |
|
6984 | el: HTMLDivElement | ZRText | null,
|
6985 | |
6986 |
|
6987 |
|
6988 | rect: RectLike | null, size: {
|
6989 | |
6990 |
|
6991 |
|
6992 | contentSize: [number, number];
|
6993 | |
6994 |
|
6995 |
|
6996 | viewSize: [number, number];
|
6997 | }): Array<number | string> | TooltipBuiltinPosition | TooltipBoxLayoutOption;
|
6998 | }
|
6999 |
|
7000 |
|
7001 |
|
7002 |
|
7003 | interface CommonTooltipOption<FormatterParams> {
|
7004 | show?: boolean;
|
7005 | |
7006 |
|
7007 |
|
7008 | triggerOn?: 'mousemove' | 'click' | 'none' | 'mousemove|click';
|
7009 | |
7010 |
|
7011 |
|
7012 | alwaysShowContent?: boolean;
|
7013 | formatter?: string | TooltipFormatterCallback<FormatterParams>;
|
7014 | |
7015 |
|
7016 |
|
7017 |
|
7018 |
|
7019 | valueFormatter?: (value: OptionDataValue | OptionDataValue[], dataIndex: number) => string;
|
7020 | |
7021 |
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 | position?: (number | string)[] | TooltipBuiltinPosition | TooltipPositionCallback | TooltipBoxLayoutOption;
|
7028 | confine?: boolean;
|
7029 | |
7030 |
|
7031 |
|
7032 | align?: HorizontalAlign;
|
7033 | verticalAlign?: VerticalAlign;
|
7034 | |
7035 |
|
7036 |
|
7037 | showDelay?: number;
|
7038 | |
7039 |
|
7040 |
|
7041 | hideDelay?: number;
|
7042 | transitionDuration?: number;
|
7043 | |
7044 |
|
7045 |
|
7046 |
|
7047 | enterable?: boolean;
|
7048 | backgroundColor?: ColorString;
|
7049 | borderColor?: ColorString;
|
7050 | borderRadius?: number;
|
7051 | borderWidth?: number;
|
7052 | shadowBlur?: number;
|
7053 | shadowColor?: string;
|
7054 | shadowOffsetX?: number;
|
7055 | shadowOffsetY?: number;
|
7056 | |
7057 |
|
7058 |
|
7059 | padding?: number | number[];
|
7060 | |
7061 |
|
7062 |
|
7063 | extraCssText?: string;
|
7064 | textStyle?: Pick<LabelOption, 'color' | 'fontStyle' | 'fontWeight' | 'fontFamily' | 'fontSize' | 'lineHeight' | 'width' | 'height' | 'textBorderColor' | 'textBorderWidth' | 'textShadowColor' | 'textShadowBlur' | 'textShadowOffsetX' | 'textShadowOffsetY' | 'align'> & {
|
7065 | decoration?: string;
|
7066 | };
|
7067 | }
|
7068 | declare type ComponentItemTooltipOption<T> = CommonTooltipOption<T> & {
|
7069 | content?: string;
|
7070 | |
7071 |
|
7072 |
|
7073 |
|
7074 |
|
7075 | encodeHTMLContent?: boolean;
|
7076 | formatterParams?: ComponentItemTooltipLabelFormatterParams;
|
7077 | };
|
7078 | declare type ComponentItemTooltipLabelFormatterParams = {
|
7079 | componentType: string;
|
7080 | name: string;
|
7081 | $vars: string[];
|
7082 | } & {
|
7083 | [key in string]: unknown;
|
7084 | };
|
7085 |
|
7086 |
|
7087 |
|
7088 | declare type SeriesTooltipOption = CommonTooltipOption<CallbackDataParams> & {
|
7089 | trigger?: 'item' | 'axis' | boolean | 'none';
|
7090 | };
|
7091 | declare type LabelFormatterParams = {
|
7092 | value: ScaleDataValue;
|
7093 | axisDimension: string;
|
7094 | axisIndex: number;
|
7095 | seriesData: CallbackDataParams[];
|
7096 | };
|
7097 |
|
7098 |
|
7099 |
|
7100 | interface CommonAxisPointerOption {
|
7101 | show?: boolean | 'auto';
|
7102 | z?: number;
|
7103 | zlevel?: number;
|
7104 | triggerOn?: 'click' | 'mousemove' | 'none' | 'mousemove|click';
|
7105 | type?: 'line' | 'shadow' | 'none';
|
7106 | snap?: boolean;
|
7107 | triggerTooltip?: boolean;
|
7108 | triggerEmphasis?: boolean;
|
7109 | |
7110 |
|
7111 |
|
7112 | value?: ScaleDataValue;
|
7113 | status?: 'show' | 'hide';
|
7114 | label?: LabelOption & {
|
7115 | precision?: 'auto' | number;
|
7116 | margin?: number;
|
7117 | |
7118 |
|
7119 |
|
7120 | formatter?: string | ((params: LabelFormatterParams) => string);
|
7121 | };
|
7122 | animation?: boolean | 'auto';
|
7123 | animationDurationUpdate?: number;
|
7124 | animationEasingUpdate?: ZREasing;
|
7125 | /**
|
7126 | * Available when type is 'line'
|
7127 | */
|
7128 | lineStyle?: LineStyleOption;
|
7129 | /**
|
7130 | * Available when type is 'shadow'
|
7131 | */
|
7132 | shadowStyle?: AreaStyleOption;
|
7133 | handle?: {
|
7134 | show?: boolean;
|
7135 | icon?: string;
|
7136 | /**
|
7137 | * The size of the handle
|
7138 | */
|
7139 | size?: number | number[];
|
7140 | /**
|
7141 | * Distance from handle center to axis.
|
7142 | */
|
7143 | margin?: number;
|
7144 | color?: ColorString;
|
7145 | /**
|
7146 | * Throttle for mobile performance
|
7147 | */
|
7148 | throttle?: number;
|
7149 | } & ShadowOptionMixin;
|
7150 | seriesDataIndices?: {
|
7151 | seriesIndex: number;
|
7152 | dataIndex: number;
|
7153 | dataIndexInside: number;
|
7154 | }[];
|
7155 | }
|
7156 | interface ComponentOption {
|
7157 | mainType?: string;
|
7158 | type?: string;
|
7159 | id?: OptionId;
|
7160 | name?: OptionName;
|
7161 | z?: number;
|
7162 | zlevel?: number;
|
7163 | }
|
7164 | declare type BlurScope = 'coordinateSystem' | 'series' | 'global';
|
7165 | /**
|
7166 | * can be array of data indices.
|
7167 | * Or may be an dictionary if have different types of data like in graph.
|
7168 | */
|
7169 | declare type InnerFocus = DefaultEmphasisFocus | ArrayLike<number> | Dictionary<ArrayLike<number>>;
|
7170 | interface DefaultStatesMixin {
|
7171 | emphasis?: any;
|
7172 | select?: any;
|
7173 | blur?: any;
|
7174 | }
|
7175 | declare type DefaultEmphasisFocus = 'none' | 'self' | 'series';
|
7176 | interface DefaultStatesMixinEmphasis {
|
7177 | /**
|
7178 | * self: Focus self and blur all others.
|
7179 | * series: Focus series and blur all other series.
|
7180 | */
|
7181 | focus?: DefaultEmphasisFocus;
|
7182 | }
|
7183 | interface StatesMixinBase {
|
7184 | emphasis?: unknown;
|
7185 | select?: unknown;
|
7186 | blur?: unknown;
|
7187 | }
|
7188 | interface StatesOptionMixin<StateOption, StatesMixin extends StatesMixinBase> {
|
7189 | /**
|
7190 | * Emphasis states
|
7191 | */
|
7192 | emphasis?: StateOption & StatesMixin['emphasis'] & {
|
7193 | /**
|
7194 | * Scope of blurred element when focus.
|
7195 | *
|
7196 | * coordinateSystem: blur others in the same coordinateSystem
|
7197 | * series: blur others in the same series
|
7198 | * global: blur all others
|
7199 | *
|
7200 | * Default to be coordinate system.
|
7201 | */
|
7202 | blurScope?: BlurScope;
|
7203 | /**
|
7204 | * If emphasis state is disabled.
|
7205 | */
|
7206 | disabled?: boolean;
|
7207 | };
|
7208 | /**
|
7209 | * Select states
|
7210 | */
|
7211 | select?: StateOption & StatesMixin['select'] & {
|
7212 | disabled?: boolean;
|
7213 | };
|
7214 | /**
|
7215 | * Blur states.
|
7216 | */
|
7217 | blur?: StateOption & StatesMixin['blur'];
|
7218 | }
|
7219 | interface UniversalTransitionOption {
|
7220 | enabled?: boolean;
|
7221 | /**
|
7222 | * Animation delay of each divided element
|
7223 | */
|
7224 | delay?: (index: number, count: number) => number;
|
7225 | |
7226 |
|
7227 |
|
7228 | divideShape?: 'clone' | 'split';
|
7229 | |
7230 |
|
7231 |
|
7232 |
|
7233 |
|
7234 |
|
7235 |
|
7236 |
|
7237 |
|
7238 |
|
7239 |
|
7240 | seriesKey?: string | string[];
|
7241 | }
|
7242 | interface SeriesOption<StateOption = unknown, StatesMixin extends StatesMixinBase = DefaultStatesMixin> extends ComponentOption, AnimationOptionMixin, ColorPaletteOptionMixin, StatesOptionMixin<StateOption, StatesMixin> {
|
7243 | mainType?: 'series';
|
7244 | silent?: boolean;
|
7245 | blendMode?: string;
|
7246 | |
7247 |
|
7248 |
|
7249 | cursor?: string;
|
7250 | |
7251 |
|
7252 |
|
7253 |
|
7254 |
|
7255 |
|
7256 | dataGroupId?: OptionId;
|
7257 | data?: unknown;
|
7258 | colorBy?: ColorBy;
|
7259 | legendHoverLink?: boolean;
|
7260 | |
7261 |
|
7262 |
|
7263 | progressive?: number | false;
|
7264 | progressiveThreshold?: number;
|
7265 | progressiveChunkMode?: 'mod';
|
7266 | |
7267 |
|
7268 |
|
7269 | coordinateSystem?: string;
|
7270 | hoverLayerThreshold?: number;
|
7271 | |
7272 |
|
7273 |
|
7274 |
|
7275 |
|
7276 | seriesLayoutBy?: 'column' | 'row';
|
7277 | labelLine?: LabelLineOption;
|
7278 | |
7279 |
|
7280 |
|
7281 | labelLayout?: LabelLayoutOption | LabelLayoutOptionCallback;
|
7282 | |
7283 |
|
7284 |
|
7285 | stateAnimation?: AnimationOption$1;
|
7286 | |
7287 |
|
7288 |
|
7289 |
|
7290 |
|
7291 |
|
7292 | universalTransition?: boolean | UniversalTransitionOption;
|
7293 | |
7294 |
|
7295 |
|
7296 |
|
7297 | selectedMap?: Dictionary<boolean> | 'all';
|
7298 | selectedMode?: 'single' | 'multiple' | 'series' | boolean;
|
7299 | }
|
7300 | interface SeriesOnCartesianOptionMixin {
|
7301 | xAxisIndex?: number;
|
7302 | yAxisIndex?: number;
|
7303 | xAxisId?: string;
|
7304 | yAxisId?: string;
|
7305 | }
|
7306 | interface SeriesOnPolarOptionMixin {
|
7307 | polarIndex?: number;
|
7308 | polarId?: string;
|
7309 | }
|
7310 | interface SeriesOnSingleOptionMixin {
|
7311 | singleAxisIndex?: number;
|
7312 | singleAxisId?: string;
|
7313 | }
|
7314 | interface SeriesOnGeoOptionMixin {
|
7315 | geoIndex?: number;
|
7316 | geoId?: string;
|
7317 | }
|
7318 | interface SeriesOnCalendarOptionMixin {
|
7319 | calendarIndex?: number;
|
7320 | calendarId?: string;
|
7321 | }
|
7322 | interface SeriesLargeOptionMixin {
|
7323 | large?: boolean;
|
7324 | largeThreshold?: number;
|
7325 | }
|
7326 | interface SeriesStackOptionMixin {
|
7327 | stack?: string;
|
7328 | stackStrategy?: 'samesign' | 'all' | 'positive' | 'negative';
|
7329 | }
|
7330 | declare type SamplingFunc = (frame: ArrayLike<number>) => number;
|
7331 | interface SeriesSamplingOptionMixin {
|
7332 | sampling?: 'none' | 'average' | 'min' | 'max' | 'minmax' | 'sum' | 'lttb' | SamplingFunc;
|
7333 | }
|
7334 | interface SeriesEncodeOptionMixin {
|
7335 | datasetIndex?: number;
|
7336 | datasetId?: string | number;
|
7337 | seriesLayoutBy?: SeriesLayoutBy;
|
7338 | sourceHeader?: OptionSourceHeader;
|
7339 | dimensions?: DimensionDefinitionLoose[];
|
7340 | encode?: OptionEncode;
|
7341 | }
|
7342 | interface AriaLabelOption {
|
7343 | enabled?: boolean;
|
7344 | description?: string;
|
7345 | general?: {
|
7346 | withTitle?: string;
|
7347 | withoutTitle?: string;
|
7348 | };
|
7349 | series?: {
|
7350 | maxCount?: number;
|
7351 | single?: {
|
7352 | prefix?: string;
|
7353 | withName?: string;
|
7354 | withoutName?: string;
|
7355 | };
|
7356 | multiple?: {
|
7357 | prefix?: string;
|
7358 | withName?: string;
|
7359 | withoutName?: string;
|
7360 | separator?: {
|
7361 | middle?: string;
|
7362 | end?: string;
|
7363 | };
|
7364 | };
|
7365 | };
|
7366 | data?: {
|
7367 | maxCount?: number;
|
7368 | allData?: string;
|
7369 | partialData?: string;
|
7370 | withName?: string;
|
7371 | withoutName?: string;
|
7372 | separator?: {
|
7373 | middle?: string;
|
7374 | end?: string;
|
7375 | };
|
7376 | };
|
7377 | }
|
7378 | interface AriaOption extends AriaLabelOption {
|
7379 | mainType?: 'aria';
|
7380 | enabled?: boolean;
|
7381 | label?: AriaLabelOption;
|
7382 | decal?: {
|
7383 | show?: boolean;
|
7384 | decals?: DecalObject | DecalObject[];
|
7385 | };
|
7386 | }
|
7387 |
|
7388 | declare type AreaStyleProps = Pick<PathStyleProps, 'fill' | 'shadowBlur' | 'shadowOffsetX' | 'shadowOffsetY' | 'opacity' | 'shadowColor'>;
|
7389 | declare class AreaStyleMixin {
|
7390 | getAreaStyle(this: Model, excludes?: readonly (keyof AreaStyleOption)[], includes?: readonly (keyof AreaStyleOption)[]): AreaStyleProps;
|
7391 | }
|
7392 |
|
7393 | declare type LabelFontOption = Pick<LabelOption, 'fontStyle' | 'fontWeight' | 'fontSize' | 'fontFamily'>;
|
7394 | declare type LabelRectRelatedOption = Pick<LabelOption, 'align' | 'verticalAlign' | 'padding' | 'lineHeight' | 'baseline' | 'rich' | 'width' | 'height' | 'overflow'> & LabelFontOption;
|
7395 | declare class TextStyleMixin {
|
7396 | |
7397 |
|
7398 |
|
7399 | getTextColor(this: Model, isEmphasis?: boolean): ColorString;
|
7400 | |
7401 |
|
7402 |
|
7403 |
|
7404 | getFont(this: Model<LabelFontOption>): string;
|
7405 | getTextRect(this: Model<LabelRectRelatedOption> & TextStyleMixin, text: string): BoundingRect;
|
7406 | }
|
7407 |
|
7408 | interface Model<Opt = ModelOption> extends LineStyleMixin, ItemStyleMixin, TextStyleMixin, AreaStyleMixin {
|
7409 | }
|
7410 | declare class Model<Opt = ModelOption> {
|
7411 | parentModel: Model;
|
7412 | ecModel: GlobalModel;
|
7413 | option: Opt;
|
7414 | constructor(option?: Opt, parentModel?: Model, ecModel?: GlobalModel);
|
7415 | init(option: Opt, parentModel?: Model, ecModel?: GlobalModel, ...rest: any): void;
|
7416 | /**
|
7417 | * Merge the input option to me.
|
7418 | */
|
7419 | mergeOption(option: Opt, ecModel?: GlobalModel): void;
|
7420 | get<R extends keyof Opt>(path: R, ignoreParent?: boolean): Opt[R];
|
7421 | get<R extends keyof Opt>(path: readonly [R], ignoreParent?: boolean): Opt[R];
|
7422 | get<R extends keyof Opt, S extends keyof Opt[R]>(path: readonly [R, S], ignoreParent?: boolean): Opt[R][S];
|
7423 | get<R extends keyof Opt, S extends keyof Opt[R], T extends keyof Opt[R][S]>(path: readonly [R, S, T], ignoreParent?: boolean): Opt[R][S][T];
|
7424 | getShallow<R extends keyof Opt>(key: R, ignoreParent?: boolean): Opt[R];
|
7425 | getModel<R extends keyof Opt>(path: R, parentModel?: Model): Model<Opt[R]>;
|
7426 | getModel<R extends keyof Opt>(path: readonly [R], parentModel?: Model): Model<Opt[R]>;
|
7427 | getModel<R extends keyof Opt, S extends keyof Opt[R]>(path: readonly [R, S], parentModel?: Model): Model<Opt[R][S]>;
|
7428 | getModel<Ra extends keyof Opt, Rb extends keyof Opt, S extends keyof Opt[Rb]>(path: readonly [Ra] | readonly [Rb, S], parentModel?: Model): Model<Opt[Ra]> | Model<Opt[Rb][S]>;
|
7429 | getModel<R extends keyof Opt, S extends keyof Opt[R], T extends keyof Opt[R][S]>(path: readonly [R, S, T], parentModel?: Model): Model<Opt[R][S][T]>;
|
7430 | /**
|
7431 | * If model has option
|
7432 | */
|
7433 | isEmpty(): boolean;
|
7434 | restoreData(): void;
|
7435 | clone(): Model<Opt>;
|
7436 | parsePath(path: string | readonly string[]): readonly string[];
|
7437 | resolveParentPath(path: readonly string[]): string[];
|
7438 | isAnimationEnabled(): boolean;
|
7439 | private _doGet;
|
7440 | }
|
7441 |
|
7442 | /**
|
7443 | * ECharts option manager
|
7444 | */
|
7445 |
|
7446 | /**
|
7447 | * TERM EXPLANATIONS:
|
7448 | * See `ECOption` and `ECUnitOption` in `src/util/types.ts`.
|
7449 | */
|
7450 | declare class OptionManager {
|
7451 | private _api;
|
7452 | private _timelineOptions;
|
7453 | private _mediaList;
|
7454 | private _mediaDefault;
|
7455 | |
7456 |
|
7457 |
|
7458 |
|
7459 | private _currentMediaIndices;
|
7460 | private _optionBackup;
|
7461 | private _newBaseOption;
|
7462 | constructor(api: ExtensionAPI);
|
7463 | setOption(rawOption: ECBasicOption, optionPreprocessorFuncs: OptionPreprocessor[], opt: InnerSetOptionOpts): void;
|
7464 | mountOption(isRecreate: boolean): ECUnitOption;
|
7465 | getTimelineOption(ecModel: GlobalModel): ECUnitOption;
|
7466 | getMediaOption(ecModel: GlobalModel): ECUnitOption[];
|
7467 | }
|
7468 |
|
7469 | declare const _default: {
|
7470 | time: {
|
7471 | month: string[];
|
7472 | monthAbbr: string[];
|
7473 | dayOfWeek: string[];
|
7474 | dayOfWeekAbbr: string[];
|
7475 | };
|
7476 | legend: {
|
7477 | selector: {
|
7478 | all: string;
|
7479 | inverse: string;
|
7480 | };
|
7481 | };
|
7482 | toolbox: {
|
7483 | brush: {
|
7484 | title: {
|
7485 | rect: string;
|
7486 | polygon: string;
|
7487 | lineX: string;
|
7488 | lineY: string;
|
7489 | keep: string;
|
7490 | clear: string;
|
7491 | };
|
7492 | };
|
7493 | dataView: {
|
7494 | title: string;
|
7495 | lang: string[];
|
7496 | };
|
7497 | dataZoom: {
|
7498 | title: {
|
7499 | zoom: string;
|
7500 | back: string;
|
7501 | };
|
7502 | };
|
7503 | magicType: {
|
7504 | title: {
|
7505 | line: string;
|
7506 | bar: string;
|
7507 | stack: string;
|
7508 | tiled: string;
|
7509 | };
|
7510 | };
|
7511 | restore: {
|
7512 | title: string;
|
7513 | };
|
7514 | saveAsImage: {
|
7515 | title: string;
|
7516 | lang: string[];
|
7517 | };
|
7518 | };
|
7519 | series: {
|
7520 | typeNames: {
|
7521 | pie: string;
|
7522 | bar: string;
|
7523 | line: string;
|
7524 | scatter: string;
|
7525 | effectScatter: string;
|
7526 | radar: string;
|
7527 | tree: string;
|
7528 | treemap: string;
|
7529 | boxplot: string;
|
7530 | candlestick: string;
|
7531 | k: string;
|
7532 | heatmap: string;
|
7533 | map: string;
|
7534 | parallel: string;
|
7535 | lines: string;
|
7536 | graph: string;
|
7537 | sankey: string;
|
7538 | funnel: string;
|
7539 | gauge: string;
|
7540 | pictorialBar: string;
|
7541 | themeRiver: string;
|
7542 | sunburst: string;
|
7543 | custom: string;
|
7544 | chart: string;
|
7545 | };
|
7546 | };
|
7547 | aria: {
|
7548 | general: {
|
7549 | withTitle: string;
|
7550 | withoutTitle: string;
|
7551 | };
|
7552 | series: {
|
7553 | single: {
|
7554 | prefix: string;
|
7555 | withName: string;
|
7556 | withoutName: string;
|
7557 | };
|
7558 | multiple: {
|
7559 | prefix: string;
|
7560 | withName: string;
|
7561 | withoutName: string;
|
7562 | separator: {
|
7563 | middle: string;
|
7564 | end: string;
|
7565 | };
|
7566 | };
|
7567 | };
|
7568 | data: {
|
7569 | allData: string;
|
7570 | partialData: string;
|
7571 | withName: string;
|
7572 | withoutName: string;
|
7573 | separator: {
|
7574 | middle: string;
|
7575 | end: string;
|
7576 | };
|
7577 | };
|
7578 | };
|
7579 | };
|
7580 |
|
7581 | declare type LocaleOption = typeof _default;
|
7582 | declare function registerLocale(locale: string, localeObj: LocaleOption): void;
|
7583 |
|
7584 |
|
7585 |
|
7586 |
|
7587 |
|
7588 |
|
7589 |
|
7590 |
|
7591 |
|
7592 |
|
7593 |
|
7594 |
|
7595 |
|
7596 |
|
7597 |
|
7598 |
|
7599 | interface GlobalModelSetOptionOpts {
|
7600 | replaceMerge: ComponentMainType | ComponentMainType[];
|
7601 | }
|
7602 | interface InnerSetOptionOpts {
|
7603 | replaceMergeMainTypeMap: HashMap<boolean, string>;
|
7604 | }
|
7605 |
|
7606 |
|
7607 |
|
7608 |
|
7609 |
|
7610 |
|
7611 |
|
7612 |
|
7613 |
|
7614 |
|
7615 | interface QueryConditionKindA {
|
7616 | mainType: ComponentMainType;
|
7617 | subType?: ComponentSubType;
|
7618 | query?: {
|
7619 | [k: string]: number | number[] | string | string[];
|
7620 | };
|
7621 | filter?: (cmpt: ComponentModel) => boolean;
|
7622 | }
|
7623 |
|
7624 |
|
7625 |
|
7626 |
|
7627 |
|
7628 |
|
7629 |
|
7630 |
|
7631 | interface QueryConditionKindB {
|
7632 | mainType: ComponentMainType;
|
7633 | subType?: ComponentSubType;
|
7634 | index?: number | number[];
|
7635 | id?: OptionId | OptionId[];
|
7636 | name?: OptionName | OptionName[];
|
7637 | }
|
7638 | interface EachComponentAllCallback {
|
7639 | (mainType: string, model: ComponentModel, componentIndex: number): void;
|
7640 | }
|
7641 | interface EachComponentInMainTypeCallback {
|
7642 | (model: ComponentModel, componentIndex: number): void;
|
7643 | }
|
7644 | declare class GlobalModel extends Model<ECUnitOption> {
|
7645 | option: ECUnitOption;
|
7646 | private _theme;
|
7647 | private _locale;
|
7648 | private _optionManager;
|
7649 | private _componentsMap;
|
7650 | |
7651 |
|
7652 |
|
7653 |
|
7654 | private _componentsCount;
|
7655 | |
7656 |
|
7657 |
|
7658 |
|
7659 |
|
7660 |
|
7661 |
|
7662 | private _seriesIndices;
|
7663 | |
7664 |
|
7665 |
|
7666 |
|
7667 | private _seriesIndicesMap;
|
7668 | |
7669 |
|
7670 |
|
7671 | private _payload;
|
7672 | scheduler: Scheduler;
|
7673 | ssr: boolean;
|
7674 | init(option: ECBasicOption, parentModel: Model, ecModel: GlobalModel, theme: object, locale: object, optionManager: OptionManager): void;
|
7675 | setOption(option: ECBasicOption, opts: GlobalModelSetOptionOpts, optionPreprocessorFuncs: OptionPreprocessor[]): void;
|
7676 | |
7677 |
|
7678 |
|
7679 |
|
7680 |
|
7681 |
|
7682 |
|
7683 | resetOption(type: 'recreate' | 'timeline' | 'media', opt?: Pick<GlobalModelSetOptionOpts, 'replaceMerge'>): boolean;
|
7684 | private _resetOption;
|
7685 | mergeOption(option: ECUnitOption): void;
|
7686 | private _mergeOption;
|
7687 | |
7688 |
|
7689 |
|
7690 | getOption(): ECUnitOption;
|
7691 | getTheme(): Model;
|
7692 | getLocaleModel(): Model<LocaleOption>;
|
7693 | setUpdatePayload(payload: Payload): void;
|
7694 | getUpdatePayload(): Payload;
|
7695 | |
7696 |
|
7697 |
|
7698 | getComponent(mainType: ComponentMainType, idx?: number): ComponentModel;
|
7699 | |
7700 |
|
7701 |
|
7702 | queryComponents(condition: QueryConditionKindB): ComponentModel[];
|
7703 | |
7704 |
|
7705 |
|
7706 |
|
7707 |
|
7708 |
|
7709 |
|
7710 |
|
7711 |
|
7712 |
|
7713 |
|
7714 |
|
7715 |
|
7716 |
|
7717 |
|
7718 |
|
7719 |
|
7720 | findComponents(condition: QueryConditionKindA): ComponentModel[];
|
7721 | |
7722 |
|
7723 |
|
7724 |
|
7725 |
|
7726 |
|
7727 |
|
7728 |
|
7729 |
|
7730 |
|
7731 |
|
7732 |
|
7733 |
|
7734 |
|
7735 |
|
7736 |
|
7737 |
|
7738 |
|
7739 |
|
7740 |
|
7741 | eachComponent<T>(cb: EachComponentAllCallback, context?: T): void;
|
7742 | eachComponent<T>(mainType: string, cb: EachComponentInMainTypeCallback, context?: T): void;
|
7743 | eachComponent<T>(mainType: QueryConditionKindA, cb: EachComponentInMainTypeCallback, context?: T): void;
|
7744 | |
7745 |
|
7746 |
|
7747 | getSeriesByName(name: OptionName): SeriesModel[];
|
7748 | |
7749 |
|
7750 |
|
7751 | getSeriesByIndex(seriesIndex: number): SeriesModel;
|
7752 | |
7753 |
|
7754 |
|
7755 |
|
7756 | getSeriesByType(subType: ComponentSubType): SeriesModel[];
|
7757 | |
7758 |
|
7759 |
|
7760 | getSeries(): SeriesModel[];
|
7761 | |
7762 |
|
7763 |
|
7764 | getSeriesCount(): number;
|
7765 | |
7766 |
|
7767 |
|
7768 |
|
7769 | eachSeries<T>(cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => void, context?: T): void;
|
7770 | /**
|
7771 | * Iterate raw series before filtered.
|
7772 | *
|
7773 | * @param {Function} cb
|
7774 | * @param {*} context
|
7775 | */
|
7776 | eachRawSeries<T>(cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => void, context?: T): void;
|
7777 | /**
|
7778 | * After filtering, series may be different.
|
7779 | * from raw series.
|
7780 | */
|
7781 | eachSeriesByType<T>(subType: ComponentSubType, cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => void, context?: T): void;
|
7782 | /**
|
7783 | * Iterate raw series before filtered of given type.
|
7784 | */
|
7785 | eachRawSeriesByType<T>(subType: ComponentSubType, cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => void, context?: T): void;
|
7786 | isSeriesFiltered(seriesModel: SeriesModel): boolean;
|
7787 | getCurrentSeriesIndices(): number[];
|
7788 | filterSeries<T>(cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => boolean, context?: T): void;
|
7789 | restoreData(payload?: Payload): void;
|
7790 | private static internalField;
|
7791 | }
|
7792 | interface GlobalModel extends PaletteMixin<ECUnitOption> {
|
7793 | }
|
7794 |
|
7795 | interface UpdateLifecycleTransitionSeriesFinder {
|
7796 | seriesIndex?: ModelFinderIndexQuery;
|
7797 | seriesId?: ModelFinderIdQuery;
|
7798 | dimension: DimensionLoose;
|
7799 | }
|
7800 | interface UpdateLifecycleTransitionItem {
|
7801 | from?: UpdateLifecycleTransitionSeriesFinder | UpdateLifecycleTransitionSeriesFinder[];
|
7802 | to: UpdateLifecycleTransitionSeriesFinder | UpdateLifecycleTransitionSeriesFinder[];
|
7803 | }
|
7804 | declare type UpdateLifecycleTransitionOpt = UpdateLifecycleTransitionItem | UpdateLifecycleTransitionItem[];
|
7805 | interface UpdateLifecycleParams {
|
7806 | updatedSeries?: SeriesModel[];
|
7807 | /**
|
7808 | * If this update is from setOption and option is changed.
|
7809 | */
|
7810 | optionChanged?: boolean;
|
7811 | seriesTransition?: UpdateLifecycleTransitionOpt;
|
7812 | }
|
7813 | interface LifecycleEvents {
|
7814 | 'afterinit': [EChartsType];
|
7815 | 'series:beforeupdate': [GlobalModel, ExtensionAPI, UpdateLifecycleParams];
|
7816 | 'series:layoutlabels': [GlobalModel, ExtensionAPI, UpdateLifecycleParams];
|
7817 | 'series:transition': [GlobalModel, ExtensionAPI, UpdateLifecycleParams];
|
7818 | 'series:afterupdate': [GlobalModel, ExtensionAPI, UpdateLifecycleParams];
|
7819 | 'afterupdate': [GlobalModel, ExtensionAPI];
|
7820 | }
|
7821 |
|
7822 | declare class GeoJSONResource implements GeoResource {
|
7823 | readonly type = "geoJSON";
|
7824 | private _geoJSON;
|
7825 | private _specialAreas;
|
7826 | private _mapName;
|
7827 | private _parsedMap;
|
7828 | constructor(mapName: string, geoJSON: GeoJSONSourceInput, specialAreas: GeoSpecialAreas);
|
7829 | /**
|
7830 | * @param nameMap can be null/undefined
|
7831 | * @param nameProperty can be null/undefined
|
7832 | */
|
7833 | load(nameMap: NameMap, nameProperty: string): {
|
7834 | regions: GeoJSONRegion[];
|
7835 | boundingRect: BoundingRect;
|
7836 | regionsMap: HashMap<GeoJSONRegion, string | number>;
|
7837 | };
|
7838 | private _parseToRegions;
|
7839 | /**
|
7840 | * Only for exporting to users.
|
7841 | * **MUST NOT** used internally.
|
7842 | */
|
7843 | getMapForUser(): {
|
7844 | geoJson: GeoJSON | GeoJSONCompressed;
|
7845 | geoJSON: GeoJSON | GeoJSONCompressed;
|
7846 | specialAreas: GeoSpecialAreas;
|
7847 | };
|
7848 | }
|
7849 |
|
7850 | declare type MapInput = GeoJSONMapInput | SVGMapInput;
|
7851 | interface GeoJSONMapInput {
|
7852 | geoJSON: GeoJSONSourceInput;
|
7853 | specialAreas: GeoSpecialAreas;
|
7854 | }
|
7855 | interface SVGMapInput {
|
7856 | svg: GeoSVGSourceInput;
|
7857 | }
|
7858 | declare const _default$1: {
|
7859 | /**
|
7860 | * Compatible with previous `echarts.registerMap`.
|
7861 | *
|
7862 | * @usage
|
7863 | * ```js
|
7864 | *
|
7865 | * echarts.registerMap('USA', geoJson, specialAreas);
|
7866 | *
|
7867 | * echarts.registerMap('USA', {
|
7868 | * geoJson: geoJson,
|
7869 | * specialAreas: {...}
|
7870 | * });
|
7871 | * echarts.registerMap('USA', {
|
7872 | * geoJSON: geoJson,
|
7873 | * specialAreas: {...}
|
7874 | * });
|
7875 | *
|
7876 | * echarts.registerMap('airport', {
|
7877 | * svg: svg
|
7878 | * }
|
7879 | * ```
|
7880 | *
|
7881 | * Note:
|
7882 | * Do not support that register multiple geoJSON or SVG
|
7883 | * one map name. Because different geoJSON and SVG have
|
7884 | * different unit. It's not easy to make sure how those
|
7885 | * units are mapping/normalize.
|
7886 | * If intending to use multiple geoJSON or SVG, we can
|
7887 | * use multiple geo coordinate system.
|
7888 | */
|
7889 | registerMap: (mapName: string, rawDef: MapInput | GeoJSONSourceInput, rawSpecialAreas?: GeoSpecialAreas) => void;
|
7890 | getGeoResource(mapName: string): GeoResource;
|
7891 | |
7892 |
|
7893 |
|
7894 |
|
7895 | getMapForUser: (mapName: string) => ReturnType<GeoJSONResource['getMapForUser']>;
|
7896 | load: (mapName: string, nameMap: NameMap, nameProperty: string) => ReturnType<GeoResource['load']>;
|
7897 | };
|
7898 |
|
7899 | declare type ModelFinder$1 = ModelFinder;
|
7900 | declare const version$1 = "5.5.1";
|
7901 | declare const dependencies: {
|
7902 | zrender: string;
|
7903 | };
|
7904 | declare const PRIORITY: {
|
7905 | PROCESSOR: {
|
7906 | FILTER: number;
|
7907 | SERIES_FILTER: number;
|
7908 | STATISTIC: number;
|
7909 | };
|
7910 | VISUAL: {
|
7911 | LAYOUT: number;
|
7912 | PROGRESSIVE_LAYOUT: number;
|
7913 | GLOBAL: number;
|
7914 | CHART: number;
|
7915 | POST_CHART_LAYOUT: number;
|
7916 | COMPONENT: number;
|
7917 | BRUSH: number;
|
7918 | CHART_ITEM: number;
|
7919 | ARIA: number;
|
7920 | DECAL: number;
|
7921 | };
|
7922 | };
|
7923 | declare const IN_MAIN_PROCESS_KEY: "__flagInMainProcess";
|
7924 | declare const PENDING_UPDATE: "__pendingUpdate";
|
7925 | declare const STATUS_NEEDS_UPDATE_KEY: "__needsUpdateStatus";
|
7926 | declare const CONNECT_STATUS_KEY: "__connectUpdateStatus";
|
7927 | declare type SetOptionTransitionOpt = UpdateLifecycleTransitionOpt;
|
7928 | declare type SetOptionTransitionOptItem = UpdateLifecycleTransitionItem;
|
7929 | interface SetOptionOpts {
|
7930 | notMerge?: boolean;
|
7931 | lazyUpdate?: boolean;
|
7932 | silent?: boolean;
|
7933 | replaceMerge?: GlobalModelSetOptionOpts['replaceMerge'];
|
7934 | transition?: SetOptionTransitionOpt;
|
7935 | }
|
7936 | interface ResizeOpts {
|
7937 | width?: number | 'auto';
|
7938 | height?: number | 'auto';
|
7939 | animation?: AnimationOption$1;
|
7940 | silent?: boolean;
|
7941 | }
|
7942 | interface PostIniter {
|
7943 | (chart: EChartsType): void;
|
7944 | }
|
7945 | declare type RenderedEventParam = {
|
7946 | elapsedTime: number;
|
7947 | };
|
7948 | declare type ECEventDefinition = {
|
7949 | [key in ZRElementEventName]: EventCallbackSingleParam<ECElementEvent>;
|
7950 | } & {
|
7951 | rendered: EventCallbackSingleParam<RenderedEventParam>;
|
7952 | finished: () => void | boolean;
|
7953 | } & {
|
7954 | [key: string]: (...args: unknown[]) => void | boolean;
|
7955 | };
|
7956 | declare type EChartsInitOpts = {
|
7957 | locale?: string | LocaleOption;
|
7958 | renderer?: RendererType;
|
7959 | devicePixelRatio?: number;
|
7960 | useDirtyRect?: boolean;
|
7961 | useCoarsePointer?: boolean;
|
7962 | pointerSize?: number;
|
7963 | ssr?: boolean;
|
7964 | width?: number | string;
|
7965 | height?: number | string;
|
7966 | };
|
7967 | declare class ECharts extends Eventful<ECEventDefinition> {
|
7968 | |
7969 |
|
7970 |
|
7971 | id: string;
|
7972 | |
7973 |
|
7974 |
|
7975 |
|
7976 | group: string;
|
7977 | private _ssr;
|
7978 | private _zr;
|
7979 | private _dom;
|
7980 | private _model;
|
7981 | private _throttledZrFlush;
|
7982 | private _theme;
|
7983 | private _locale;
|
7984 | private _chartsViews;
|
7985 | private _chartsMap;
|
7986 | private _componentsViews;
|
7987 | private _componentsMap;
|
7988 | private _coordSysMgr;
|
7989 | private _api;
|
7990 | private _scheduler;
|
7991 | private _messageCenter;
|
7992 | private _pendingActions;
|
7993 | protected _$eventProcessor: never;
|
7994 | private _disposed;
|
7995 | private _loadingFX;
|
7996 | private [PENDING_UPDATE];
|
7997 | private [IN_MAIN_PROCESS_KEY];
|
7998 | private [CONNECT_STATUS_KEY];
|
7999 | private [STATUS_NEEDS_UPDATE_KEY];
|
8000 | constructor(dom: HTMLElement, theme?: string | ThemeOption, opts?: EChartsInitOpts);
|
8001 | private _onframe;
|
8002 | getDom(): HTMLElement;
|
8003 | getId(): string;
|
8004 | getZr(): ZRenderType;
|
8005 | isSSR(): boolean;
|
8006 | |
8007 |
|
8008 |
|
8009 |
|
8010 |
|
8011 |
|
8012 |
|
8013 |
|
8014 |
|
8015 |
|
8016 |
|
8017 |
|
8018 |
|
8019 |
|
8020 |
|
8021 | setOption<Opt extends ECBasicOption>(option: Opt, notMerge?: boolean, lazyUpdate?: boolean): void;
|
8022 | setOption<Opt extends ECBasicOption>(option: Opt, opts?: SetOptionOpts): void;
|
8023 | |
8024 |
|
8025 |
|
8026 | private setTheme;
|
8027 | private getModel;
|
8028 | getOption(): ECBasicOption;
|
8029 | getWidth(): number;
|
8030 | getHeight(): number;
|
8031 | getDevicePixelRatio(): number;
|
8032 | |
8033 |
|
8034 |
|
8035 |
|
8036 | getRenderedCanvas(opts?: any): HTMLCanvasElement;
|
8037 | renderToCanvas(opts?: {
|
8038 | backgroundColor?: ZRColor;
|
8039 | pixelRatio?: number;
|
8040 | }): HTMLCanvasElement;
|
8041 | renderToSVGString(opts?: {
|
8042 | useViewBox?: boolean;
|
8043 | }): string;
|
8044 | |
8045 |
|
8046 |
|
8047 | getSvgDataURL(): string;
|
8048 | getDataURL(opts?: {
|
8049 | type?: 'png' | 'jpeg' | 'svg';
|
8050 | pixelRatio?: number;
|
8051 | backgroundColor?: ZRColor;
|
8052 | excludeComponents?: ComponentMainType[];
|
8053 | }): string;
|
8054 | getConnectedDataURL(opts?: {
|
8055 | type?: 'png' | 'jpeg' | 'svg';
|
8056 | pixelRatio?: number;
|
8057 | backgroundColor?: ZRColor;
|
8058 | connectedBackgroundColor?: ZRColor;
|
8059 | excludeComponents?: string[];
|
8060 | }): string;
|
8061 | |
8062 |
|
8063 |
|
8064 |
|
8065 | convertToPixel(finder: ModelFinder$1, value: ScaleDataValue): number;
|
8066 | convertToPixel(finder: ModelFinder$1, value: ScaleDataValue[]): number[];
|
8067 | |
8068 |
|
8069 |
|
8070 |
|
8071 | convertFromPixel(finder: ModelFinder$1, value: number): number;
|
8072 | convertFromPixel(finder: ModelFinder$1, value: number[]): number[];
|
8073 | |
8074 |
|
8075 |
|
8076 |
|
8077 |
|
8078 | containPixel(finder: ModelFinder$1, value: number[]): boolean;
|
8079 | |
8080 |
|
8081 |
|
8082 |
|
8083 |
|
8084 |
|
8085 |
|
8086 |
|
8087 |
|
8088 |
|
8089 |
|
8090 |
|
8091 |
|
8092 |
|
8093 |
|
8094 | getVisual(finder: ModelFinder$1, visualType: string): string | number | number[] | PatternObject | LinearGradientObject | RadialGradientObject;
|
8095 | |
8096 |
|
8097 |
|
8098 | private getViewOfComponentModel;
|
8099 | |
8100 |
|
8101 |
|
8102 | private getViewOfSeriesModel;
|
8103 | private _initEvents;
|
8104 | isDisposed(): boolean;
|
8105 | clear(): void;
|
8106 | dispose(): void;
|
8107 | |
8108 |
|
8109 |
|
8110 | resize(opts?: ResizeOpts): void;
|
8111 | |
8112 |
|
8113 |
|
8114 |
|
8115 |
|
8116 | showLoading(cfg?: object): void;
|
8117 | showLoading(name?: string, cfg?: object): void;
|
8118 | |
8119 |
|
8120 |
|
8121 | hideLoading(): void;
|
8122 | makeActionFromEvent(eventObj: ECActionEvent): Payload;
|
8123 | |
8124 |
|
8125 |
|
8126 |
|
8127 |
|
8128 |
|
8129 |
|
8130 |
|
8131 |
|
8132 | dispatchAction(payload: Payload, opt?: boolean | {
|
8133 | silent?: boolean;
|
8134 | flush?: boolean | undefined;
|
8135 | }): void;
|
8136 | updateLabelLayout(): void;
|
8137 | appendData(params: {
|
8138 | seriesIndex: number;
|
8139 | data: any;
|
8140 | }): void;
|
8141 | private static internalField;
|
8142 | }
|
8143 |
|
8144 |
|
8145 |
|
8146 |
|
8147 |
|
8148 |
|
8149 |
|
8150 |
|
8151 |
|
8152 |
|
8153 | declare function init$1(dom?: HTMLElement | null, theme?: string | object | null, opts?: EChartsInitOpts): EChartsType;
|
8154 |
|
8155 |
|
8156 |
|
8157 |
|
8158 |
|
8159 |
|
8160 |
|
8161 |
|
8162 |
|
8163 |
|
8164 |
|
8165 |
|
8166 |
|
8167 |
|
8168 |
|
8169 |
|
8170 |
|
8171 | declare function connect(groupId: string | EChartsType[]): string;
|
8172 | declare function disconnect(groupId: string): void;
|
8173 |
|
8174 |
|
8175 |
|
8176 |
|
8177 | declare const disConnect: typeof disconnect;
|
8178 |
|
8179 |
|
8180 |
|
8181 | declare function dispose$1(chart: EChartsType | HTMLElement | string): void;
|
8182 | declare function getInstanceByDom(dom: HTMLElement): EChartsType | undefined;
|
8183 | declare function getInstanceById(key: string): EChartsType | undefined;
|
8184 |
|
8185 |
|
8186 |
|
8187 | declare function registerTheme(name: string, theme: ThemeOption): void;
|
8188 |
|
8189 |
|
8190 |
|
8191 | declare function registerPreprocessor(preprocessorFunc: OptionPreprocessor): void;
|
8192 | declare function registerProcessor(priority: number | StageHandler | StageHandlerOverallReset, processor?: StageHandler | StageHandlerOverallReset): void;
|
8193 |
|
8194 |
|
8195 |
|
8196 |
|
8197 | declare function registerPostInit(postInitFunc: PostIniter): void;
|
8198 |
|
8199 |
|
8200 |
|
8201 |
|
8202 | declare function registerPostUpdate(postUpdateFunc: PostUpdater): void;
|
8203 | declare function registerUpdateLifecycle<T extends keyof LifecycleEvents>(name: T, cb: (...args: LifecycleEvents[T]) => void): void;
|
8204 |
|
8205 |
|
8206 |
|
8207 |
|
8208 |
|
8209 |
|
8210 |
|
8211 |
|
8212 |
|
8213 |
|
8214 |
|
8215 |
|
8216 |
|
8217 |
|
8218 |
|
8219 |
|
8220 | declare function registerAction(type: string, eventName: string, action: ActionHandler): void;
|
8221 | declare function registerAction(type: string, action: ActionHandler): void;
|
8222 | declare function registerAction(actionInfo: ActionInfo, action: ActionHandler): void;
|
8223 | declare function registerCoordinateSystem(type: string, coordSysCreator: CoordinateSystemCreator): void;
|
8224 |
|
8225 |
|
8226 |
|
8227 |
|
8228 |
|
8229 | declare function getCoordinateSystemDimensions(type: string): DimensionDefinitionLoose[];
|
8230 |
|
8231 |
|
8232 |
|
8233 |
|
8234 |
|
8235 |
|
8236 | declare function registerLayout(priority: number, layoutTask: StageHandler | StageHandlerOverallReset): void;
|
8237 | declare function registerLayout(layoutTask: StageHandler | StageHandlerOverallReset): void;
|
8238 | declare function registerVisual(priority: number, layoutTask: StageHandler | StageHandlerOverallReset): void;
|
8239 | declare function registerVisual(layoutTask: StageHandler | StageHandlerOverallReset): void;
|
8240 |
|
8241 | declare function registerLoading(name: string, loadingFx: LoadingEffectCreator): void;
|
8242 |
|
8243 |
|
8244 |
|
8245 |
|
8246 |
|
8247 |
|
8248 |
|
8249 |
|
8250 |
|
8251 |
|
8252 |
|
8253 |
|
8254 |
|
8255 |
|
8256 |
|
8257 |
|
8258 | declare function setCanvasCreator(creator: () => HTMLCanvasElement): void;
|
8259 | declare type RegisterMapParams = Parameters<typeof _default$1.registerMap>;
|
8260 |
|
8261 |
|
8262 |
|
8263 |
|
8264 | declare function registerMap(mapName: RegisterMapParams[0], geoJson: RegisterMapParams[1], specialAreas?: RegisterMapParams[2]): void;
|
8265 | declare function getMap(mapName: string): any;
|
8266 | declare const registerTransform: typeof registerExternalTransform;
|
8267 | declare const dataTool: {};
|
8268 | interface EChartsType extends ECharts {
|
8269 | }
|
8270 |
|
8271 | declare function parse(colorStr: string, rgbaArr?: number[]): number[];
|
8272 | declare function lift(color: string, level: number): string;
|
8273 | declare function toHex(color: string): string;
|
8274 | declare function fastLerp(normalizedValue: number, colors: number[][], out?: number[]): number[];
|
8275 | declare const fastMapToColor: typeof fastLerp;
|
8276 | declare type LerpFullOutput = {
|
8277 | color: string;
|
8278 | leftIndex: number;
|
8279 | rightIndex: number;
|
8280 | value: number;
|
8281 | };
|
8282 | declare function lerp$1(normalizedValue: number, colors: string[], fullOutput: boolean): LerpFullOutput;
|
8283 | declare function lerp$1(normalizedValue: number, colors: string[]): string;
|
8284 | declare const mapToColor: typeof lerp$1;
|
8285 | declare function modifyHSL(color: string, h?: number, s?: number, l?: number): string;
|
8286 | declare function modifyAlpha(color: string, alpha?: number): string;
|
8287 | declare function stringify(arrColor: number[], type: string): string;
|
8288 | declare function lum(color: string, backgroundLum: number): number;
|
8289 | declare function random(): string;
|
8290 | declare function liftColor(color: GradientObject): GradientObject;
|
8291 | declare function liftColor(color: string): string;
|
8292 |
|
8293 | declare const color_d_parse: typeof parse;
|
8294 | declare const color_d_lift: typeof lift;
|
8295 | declare const color_d_toHex: typeof toHex;
|
8296 | declare const color_d_fastLerp: typeof fastLerp;
|
8297 | declare const color_d_fastMapToColor: typeof fastMapToColor;
|
8298 | declare const color_d_mapToColor: typeof mapToColor;
|
8299 | declare const color_d_modifyHSL: typeof modifyHSL;
|
8300 | declare const color_d_modifyAlpha: typeof modifyAlpha;
|
8301 | declare const color_d_stringify: typeof stringify;
|
8302 | declare const color_d_lum: typeof lum;
|
8303 | declare const color_d_random: typeof random;
|
8304 | declare const color_d_liftColor: typeof liftColor;
|
8305 | declare namespace color_d {
|
8306 | export {
|
8307 | color_d_parse as parse,
|
8308 | color_d_lift as lift,
|
8309 | color_d_toHex as toHex,
|
8310 | color_d_fastLerp as fastLerp,
|
8311 | color_d_fastMapToColor as fastMapToColor,
|
8312 | lerp$1 as lerp,
|
8313 | color_d_mapToColor as mapToColor,
|
8314 | color_d_modifyHSL as modifyHSL,
|
8315 | color_d_modifyAlpha as modifyAlpha,
|
8316 | color_d_stringify as stringify,
|
8317 | color_d_lum as lum,
|
8318 | color_d_random as random,
|
8319 | color_d_liftColor as liftColor,
|
8320 | };
|
8321 | }
|
8322 |
|
8323 | declare type ThrottleFunction = (this: unknown, ...args: unknown[]) => void;
|
8324 | interface ThrottleController {
|
8325 | clear(): void;
|
8326 | debounceNextCall(debounceDelay: number): void;
|
8327 | }
|
8328 |
|
8329 |
|
8330 |
|
8331 |
|
8332 |
|
8333 |
|
8334 |
|
8335 |
|
8336 |
|
8337 | declare function throttle<T extends ThrottleFunction>(fn: T, delay?: number, debounce?: boolean): T & ThrottleController;
|
8338 |
|
8339 | declare type EnableDataStackDimensionsInput = {
|
8340 | schema: SeriesDataSchema;
|
8341 | store?: DataStore;
|
8342 | };
|
8343 | declare type EnableDataStackDimensionsInputLegacy = (SeriesDimensionDefine | string)[];
|
8344 |
|
8345 |
|
8346 |
|
8347 |
|
8348 |
|
8349 |
|
8350 |
|
8351 |
|
8352 |
|
8353 |
|
8354 |
|
8355 |
|
8356 |
|
8357 |
|
8358 |
|
8359 |
|
8360 |
|
8361 |
|
8362 |
|
8363 |
|
8364 | declare function enableDataStack(seriesModel: SeriesModel<SeriesOption & SeriesStackOptionMixin>, dimensionsInput: EnableDataStackDimensionsInput | EnableDataStackDimensionsInputLegacy, opt?: {
|
8365 | stackedCoordDimension?: string;
|
8366 | byIndex?: boolean;
|
8367 | }): Pick<DataCalculationInfo<unknown>, 'stackedDimension' | 'stackedByDimension' | 'isStackedByIndex' | 'stackedOverDimension' | 'stackResultDimension'>;
|
8368 | declare function isDimensionStacked(data: SeriesData, stackedDim: string): boolean;
|
8369 | declare function getStackedDimension(data: SeriesData, targetDim: string): DimensionName;
|
8370 |
|
8371 | declare type SSRItemType = 'chart' | 'legend';
|
8372 |
|
8373 |
|
8374 |
|
8375 | interface ECData {
|
8376 | dataIndex?: number;
|
8377 | dataModel?: DataModel;
|
8378 | eventData?: ECEventData;
|
8379 | seriesIndex?: number;
|
8380 | dataType?: SeriesDataType;
|
8381 | focus?: InnerFocus;
|
8382 | blurScope?: BlurScope;
|
8383 | ssrType?: SSRItemType;
|
8384 | componentMainType?: ComponentMainType;
|
8385 | componentIndex?: number;
|
8386 | componentHighDownName?: string;
|
8387 | tooltipConfig?: {
|
8388 | name: string;
|
8389 | option: ComponentItemTooltipOption<unknown>;
|
8390 | };
|
8391 | }
|
8392 | declare const getECData: (hostObj: Element<ElementProps>) => ECData;
|
8393 |
|
8394 | interface CoordDimensionDefinition extends DimensionDefinition {
|
8395 | dimsDef?: (DimensionName | {
|
8396 | name: DimensionName;
|
8397 | defaultTooltip?: boolean;
|
8398 | })[];
|
8399 | otherDims?: DataVisualDimensions;
|
8400 | ordinalMeta?: OrdinalMeta;
|
8401 | coordDim?: DimensionName;
|
8402 | coordDimIndex?: DimensionIndex;
|
8403 | }
|
8404 | declare type CoordDimensionDefinitionLoose = CoordDimensionDefinition['name'] | CoordDimensionDefinition;
|
8405 | declare type PrepareSeriesDataSchemaParams = {
|
8406 | coordDimensions?: CoordDimensionDefinitionLoose[];
|
8407 | |
8408 |
|
8409 |
|
8410 | dimensionsDefine?: DimensionDefinitionLoose[];
|
8411 | |
8412 |
|
8413 |
|
8414 | encodeDefine?: HashMap<OptionEncodeValue, DimensionName> | OptionEncode;
|
8415 | dimensionsCount?: number;
|
8416 | |
8417 |
|
8418 |
|
8419 | encodeDefaulter?: EncodeDefaulter;
|
8420 | generateCoord?: string;
|
8421 | generateCoordCount?: number;
|
8422 | |
8423 |
|
8424 |
|
8425 |
|
8426 | canOmitUnusedDimensions?: boolean;
|
8427 | };
|
8428 |
|
8429 |
|
8430 |
|
8431 | declare function createDimensions(source: Source | OptionSourceData, opt?: PrepareSeriesDataSchemaParams): SeriesDimensionDefine[];
|
8432 |
|
8433 |
|
8434 |
|
8435 |
|
8436 |
|
8437 |
|
8438 |
|
8439 |
|
8440 | declare function enableHoverEmphasis(el: Element, focus?: InnerFocus, blurScope?: BlurScope): void;
|
8441 |
|
8442 |
|
8443 |
|
8444 |
|
8445 | declare function createList(seriesModel: SeriesModel): SeriesData<Model<any>, DefaultDataVisual>;
|
8446 |
|
8447 | declare const dataStack: {
|
8448 | isDimensionStacked: typeof isDimensionStacked;
|
8449 | enableDataStack: typeof enableDataStack;
|
8450 | getStackedDimension: typeof getStackedDimension;
|
8451 | };
|
8452 |
|
8453 |
|
8454 |
|
8455 |
|
8456 |
|
8457 |
|
8458 |
|
8459 | declare function createScale(dataExtent: number[], option: object | AxisBaseModel): Scale<Dictionary<unknown>>;
|
8460 |
|
8461 |
|
8462 |
|
8463 |
|
8464 |
|
8465 |
|
8466 |
|
8467 |
|
8468 |
|
8469 |
|
8470 | declare function mixinAxisModelCommonMethods(Model: Model): void;
|
8471 |
|
8472 | declare function createTextStyle(textStyleModel: Model<TextCommonOption>, opts?: {
|
8473 | state?: DisplayState;
|
8474 | }): TextStyleProps;
|
8475 |
|
8476 | declare const helper_d_getLayoutRect: typeof getLayoutRect;
|
8477 | declare const helper_d_getECData: typeof getECData;
|
8478 | declare const helper_d_createList: typeof createList;
|
8479 | declare const helper_d_dataStack: typeof dataStack;
|
8480 | declare const helper_d_createScale: typeof createScale;
|
8481 | declare const helper_d_mixinAxisModelCommonMethods: typeof mixinAxisModelCommonMethods;
|
8482 | declare const helper_d_createTextStyle: typeof createTextStyle;
|
8483 | declare const helper_d_createDimensions: typeof createDimensions;
|
8484 | declare const helper_d_createSymbol: typeof createSymbol;
|
8485 | declare const helper_d_enableHoverEmphasis: typeof enableHoverEmphasis;
|
8486 | declare namespace helper_d {
|
8487 | export {
|
8488 | helper_d_getLayoutRect as getLayoutRect,
|
8489 | helper_d_getECData as getECData,
|
8490 | helper_d_createList as createList,
|
8491 | helper_d_dataStack as dataStack,
|
8492 | helper_d_createScale as createScale,
|
8493 | helper_d_mixinAxisModelCommonMethods as mixinAxisModelCommonMethods,
|
8494 | helper_d_createTextStyle as createTextStyle,
|
8495 | helper_d_createDimensions as createDimensions,
|
8496 | helper_d_createSymbol as createSymbol,
|
8497 | helper_d_enableHoverEmphasis as enableHoverEmphasis,
|
8498 | };
|
8499 | }
|
8500 |
|
8501 | interface Platform {
|
8502 | createCanvas(): HTMLCanvasElement;
|
8503 | measureText(text: string, font?: string): {
|
8504 | width: number;
|
8505 | };
|
8506 | loadImage(src: string, onload: () => void | HTMLImageElement['onload'], onerror: () => void | HTMLImageElement['onerror']): HTMLImageElement;
|
8507 | }
|
8508 | declare function setPlatformAPI(newPlatformApis: Partial<Platform>): void;
|
8509 |
|
8510 | declare function parseGeoJSON(geoJson: GeoJSON | GeoJSONCompressed, nameProperty: string): GeoJSONRegion[];
|
8511 |
|
8512 |
|
8513 |
|
8514 |
|
8515 |
|
8516 |
|
8517 |
|
8518 |
|
8519 | declare function linearMap(val: number, domain: number[], range: number[], clamp?: boolean): number;
|
8520 |
|
8521 |
|
8522 |
|
8523 |
|
8524 | declare function round(x: number | string, precision?: number): number;
|
8525 | declare function round(x: number | string, precision: number, returnStr: false): number;
|
8526 | declare function round(x: number | string, precision: number, returnStr: true): string;
|
8527 |
|
8528 |
|
8529 |
|
8530 |
|
8531 | declare function asc<T extends number[]>(arr: T): T;
|
8532 |
|
8533 |
|
8534 |
|
8535 | declare function getPrecision(val: string | number): number;
|
8536 |
|
8537 |
|
8538 |
|
8539 | declare function getPrecisionSafe(val: string | number): number;
|
8540 |
|
8541 |
|
8542 |
|
8543 | declare function getPixelPrecision(dataExtent: [number, number], pixelExtent: [number, number]): number;
|
8544 |
|
8545 |
|
8546 |
|
8547 |
|
8548 |
|
8549 |
|
8550 |
|
8551 |
|
8552 |
|
8553 |
|
8554 |
|
8555 | declare function getPercentWithPrecision(valueList: number[], idx: number, precision: number): number;
|
8556 | declare const MAX_SAFE_INTEGER = 9007199254740991;
|
8557 |
|
8558 |
|
8559 |
|
8560 | declare function remRadian(radian: number): number;
|
8561 |
|
8562 |
|
8563 |
|
8564 |
|
8565 | declare function isRadianAroundZero(val: number): boolean;
|
8566 |
|
8567 |
|
8568 |
|
8569 |
|
8570 |
|
8571 |
|
8572 |
|
8573 |
|
8574 |
|
8575 |
|
8576 |
|
8577 |
|
8578 |
|
8579 |
|
8580 |
|
8581 |
|
8582 | declare function parseDate(value: unknown): Date;
|
8583 |
|
8584 |
|
8585 |
|
8586 |
|
8587 |
|
8588 |
|
8589 | declare function quantity(val: number): number;
|
8590 |
|
8591 |
|
8592 |
|
8593 |
|
8594 |
|
8595 |
|
8596 |
|
8597 | declare function quantityExponent(val: number): number;
|
8598 |
|
8599 |
|
8600 |
|
8601 |
|
8602 |
|
8603 |
|
8604 |
|
8605 |
|
8606 |
|
8607 |
|
8608 |
|
8609 | declare function nice(val: number, round?: boolean): number;
|
8610 |
|
8611 |
|
8612 |
|
8613 |
|
8614 |
|
8615 |
|
8616 | declare function quantile(ascArr: number[], p: number): number;
|
8617 | declare type IntervalItem = {
|
8618 | interval: [number, number];
|
8619 | close: [0 | 1, 0 | 1];
|
8620 | };
|
8621 |
|
8622 |
|
8623 |
|
8624 |
|
8625 |
|
8626 |
|
8627 |
|
8628 |
|
8629 |
|
8630 |
|
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 |
|
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 | declare function reformIntervals(list: IntervalItem[]): IntervalItem[];
|
8644 |
|
8645 |
|
8646 |
|
8647 |
|
8648 |
|
8649 |
|
8650 |
|
8651 |
|
8652 |
|
8653 |
|
8654 |
|
8655 |
|
8656 |
|
8657 |
|
8658 |
|
8659 |
|
8660 | declare function numericToNumber(val: unknown): number;
|
8661 |
|
8662 |
|
8663 |
|
8664 | declare function isNumeric(val: unknown): val is number;
|
8665 |
|
8666 | declare const number_d_linearMap: typeof linearMap;
|
8667 | declare const number_d_round: typeof round;
|
8668 | declare const number_d_asc: typeof asc;
|
8669 | declare const number_d_getPrecision: typeof getPrecision;
|
8670 | declare const number_d_getPrecisionSafe: typeof getPrecisionSafe;
|
8671 | declare const number_d_getPixelPrecision: typeof getPixelPrecision;
|
8672 | declare const number_d_getPercentWithPrecision: typeof getPercentWithPrecision;
|
8673 | declare const number_d_MAX_SAFE_INTEGER: typeof MAX_SAFE_INTEGER;
|
8674 | declare const number_d_remRadian: typeof remRadian;
|
8675 | declare const number_d_isRadianAroundZero: typeof isRadianAroundZero;
|
8676 | declare const number_d_parseDate: typeof parseDate;
|
8677 | declare const number_d_quantity: typeof quantity;
|
8678 | declare const number_d_quantityExponent: typeof quantityExponent;
|
8679 | declare const number_d_nice: typeof nice;
|
8680 | declare const number_d_quantile: typeof quantile;
|
8681 | declare const number_d_reformIntervals: typeof reformIntervals;
|
8682 | declare const number_d_isNumeric: typeof isNumeric;
|
8683 | declare const number_d_numericToNumber: typeof numericToNumber;
|
8684 | declare namespace number_d {
|
8685 | export {
|
8686 | number_d_linearMap as linearMap,
|
8687 | number_d_round as round,
|
8688 | number_d_asc as asc,
|
8689 | number_d_getPrecision as getPrecision,
|
8690 | number_d_getPrecisionSafe as getPrecisionSafe,
|
8691 | number_d_getPixelPrecision as getPixelPrecision,
|
8692 | number_d_getPercentWithPrecision as getPercentWithPrecision,
|
8693 | number_d_MAX_SAFE_INTEGER as MAX_SAFE_INTEGER,
|
8694 | number_d_remRadian as remRadian,
|
8695 | number_d_isRadianAroundZero as isRadianAroundZero,
|
8696 | number_d_parseDate as parseDate,
|
8697 | number_d_quantity as quantity,
|
8698 | number_d_quantityExponent as quantityExponent,
|
8699 | number_d_nice as nice,
|
8700 | number_d_quantile as quantile,
|
8701 | number_d_reformIntervals as reformIntervals,
|
8702 | number_d_isNumeric as isNumeric,
|
8703 | number_d_numericToNumber as numericToNumber,
|
8704 | };
|
8705 | }
|
8706 |
|
8707 | declare function format(time: unknown, template: string, isUTC: boolean, lang?: string | Model<LocaleOption>): string;
|
8708 |
|
8709 | declare const time_d_format: typeof format;
|
8710 | declare namespace time_d {
|
8711 | export {
|
8712 | parseDate as parse,
|
8713 | time_d_format as format,
|
8714 | };
|
8715 | }
|
8716 |
|
8717 | declare const graphic_d_extendShape: typeof extendShape;
|
8718 | declare const graphic_d_extendPath: typeof extendPath;
|
8719 | declare const graphic_d_makePath: typeof makePath;
|
8720 | declare const graphic_d_makeImage: typeof makeImage;
|
8721 | declare const graphic_d_resizePath: typeof resizePath;
|
8722 | declare const graphic_d_createIcon: typeof createIcon;
|
8723 | declare const graphic_d_updateProps: typeof updateProps;
|
8724 | declare const graphic_d_initProps: typeof initProps;
|
8725 | declare const graphic_d_getTransform: typeof getTransform;
|
8726 | declare const graphic_d_clipPointsByRect: typeof clipPointsByRect;
|
8727 | declare const graphic_d_clipRectByRect: typeof clipRectByRect;
|
8728 | declare const graphic_d_registerShape: typeof registerShape;
|
8729 | declare const graphic_d_getShapeClass: typeof getShapeClass;
|
8730 | type graphic_d_Group = Group;
|
8731 | declare const graphic_d_Group: typeof Group;
|
8732 | type graphic_d_Circle = Circle;
|
8733 | declare const graphic_d_Circle: typeof Circle;
|
8734 | type graphic_d_Ellipse = Ellipse;
|
8735 | declare const graphic_d_Ellipse: typeof Ellipse;
|
8736 | type graphic_d_Sector = Sector;
|
8737 | declare const graphic_d_Sector: typeof Sector;
|
8738 | type graphic_d_Ring = Ring;
|
8739 | declare const graphic_d_Ring: typeof Ring;
|
8740 | type graphic_d_Polygon = Polygon;
|
8741 | declare const graphic_d_Polygon: typeof Polygon;
|
8742 | type graphic_d_Polyline = Polyline;
|
8743 | declare const graphic_d_Polyline: typeof Polyline;
|
8744 | type graphic_d_Rect = Rect;
|
8745 | declare const graphic_d_Rect: typeof Rect;
|
8746 | type graphic_d_Line = Line;
|
8747 | declare const graphic_d_Line: typeof Line;
|
8748 | type graphic_d_BezierCurve = BezierCurve;
|
8749 | declare const graphic_d_BezierCurve: typeof BezierCurve;
|
8750 | type graphic_d_Arc = Arc;
|
8751 | declare const graphic_d_Arc: typeof Arc;
|
8752 | type graphic_d_IncrementalDisplayable = IncrementalDisplayable;
|
8753 | declare const graphic_d_IncrementalDisplayable: typeof IncrementalDisplayable;
|
8754 | type graphic_d_CompoundPath = CompoundPath;
|
8755 | declare const graphic_d_CompoundPath: typeof CompoundPath;
|
8756 | type graphic_d_LinearGradient = LinearGradient;
|
8757 | declare const graphic_d_LinearGradient: typeof LinearGradient;
|
8758 | type graphic_d_RadialGradient = RadialGradient;
|
8759 | declare const graphic_d_RadialGradient: typeof RadialGradient;
|
8760 | type graphic_d_BoundingRect = BoundingRect;
|
8761 | declare const graphic_d_BoundingRect: typeof BoundingRect;
|
8762 | declare namespace graphic_d {
|
8763 | export {
|
8764 | graphic_d_extendShape as extendShape,
|
8765 | graphic_d_extendPath as extendPath,
|
8766 | graphic_d_makePath as makePath,
|
8767 | graphic_d_makeImage as makeImage,
|
8768 | mergePath$1 as mergePath,
|
8769 | graphic_d_resizePath as resizePath,
|
8770 | graphic_d_createIcon as createIcon,
|
8771 | graphic_d_updateProps as updateProps,
|
8772 | graphic_d_initProps as initProps,
|
8773 | graphic_d_getTransform as getTransform,
|
8774 | graphic_d_clipPointsByRect as clipPointsByRect,
|
8775 | graphic_d_clipRectByRect as clipRectByRect,
|
8776 | graphic_d_registerShape as registerShape,
|
8777 | graphic_d_getShapeClass as getShapeClass,
|
8778 | graphic_d_Group as Group,
|
8779 | ZRImage as Image,
|
8780 | ZRText as Text,
|
8781 | graphic_d_Circle as Circle,
|
8782 | graphic_d_Ellipse as Ellipse,
|
8783 | graphic_d_Sector as Sector,
|
8784 | graphic_d_Ring as Ring,
|
8785 | graphic_d_Polygon as Polygon,
|
8786 | graphic_d_Polyline as Polyline,
|
8787 | graphic_d_Rect as Rect,
|
8788 | graphic_d_Line as Line,
|
8789 | graphic_d_BezierCurve as BezierCurve,
|
8790 | graphic_d_Arc as Arc,
|
8791 | graphic_d_IncrementalDisplayable as IncrementalDisplayable,
|
8792 | graphic_d_CompoundPath as CompoundPath,
|
8793 | graphic_d_LinearGradient as LinearGradient,
|
8794 | graphic_d_RadialGradient as RadialGradient,
|
8795 | graphic_d_BoundingRect as BoundingRect,
|
8796 | };
|
8797 | }
|
8798 |
|
8799 | declare const format_d_addCommas: typeof addCommas;
|
8800 | declare const format_d_toCamelCase: typeof toCamelCase;
|
8801 | declare const format_d_encodeHTML: typeof encodeHTML;
|
8802 | declare const format_d_formatTpl: typeof formatTpl;
|
8803 | declare const format_d_getTooltipMarker: typeof getTooltipMarker;
|
8804 | declare const format_d_formatTime: typeof formatTime;
|
8805 | declare const format_d_capitalFirst: typeof capitalFirst;
|
8806 | declare const format_d_truncateText: typeof truncateText;
|
8807 | declare const format_d_getTextRect: typeof getTextRect;
|
8808 | declare namespace format_d {
|
8809 | export {
|
8810 | format_d_addCommas as addCommas,
|
8811 | format_d_toCamelCase as toCamelCase,
|
8812 | normalizeCssArray$1 as normalizeCssArray,
|
8813 | format_d_encodeHTML as encodeHTML,
|
8814 | format_d_formatTpl as formatTpl,
|
8815 | format_d_getTooltipMarker as getTooltipMarker,
|
8816 | format_d_formatTime as formatTime,
|
8817 | format_d_capitalFirst as capitalFirst,
|
8818 | format_d_truncateText as truncateText,
|
8819 | format_d_getTextRect as getTextRect,
|
8820 | };
|
8821 | }
|
8822 |
|
8823 | declare const util_d$1_map: typeof map;
|
8824 | declare const util_d$1_each: typeof each;
|
8825 | declare const util_d$1_indexOf: typeof indexOf;
|
8826 | declare const util_d$1_inherits: typeof inherits;
|
8827 | declare const util_d$1_reduce: typeof reduce;
|
8828 | declare const util_d$1_filter: typeof filter;
|
8829 | declare const util_d$1_bind: typeof bind;
|
8830 | declare const util_d$1_curry: typeof curry;
|
8831 | declare const util_d$1_isArray: typeof isArray;
|
8832 | declare const util_d$1_isString: typeof isString;
|
8833 | declare const util_d$1_isObject: typeof isObject;
|
8834 | declare const util_d$1_isFunction: typeof isFunction;
|
8835 | declare const util_d$1_extend: typeof extend;
|
8836 | declare const util_d$1_defaults: typeof defaults;
|
8837 | declare const util_d$1_clone: typeof clone;
|
8838 | declare const util_d$1_merge: typeof merge;
|
8839 | declare namespace util_d$1 {
|
8840 | export {
|
8841 | util_d$1_map as map,
|
8842 | util_d$1_each as each,
|
8843 | util_d$1_indexOf as indexOf,
|
8844 | util_d$1_inherits as inherits,
|
8845 | util_d$1_reduce as reduce,
|
8846 | util_d$1_filter as filter,
|
8847 | util_d$1_bind as bind,
|
8848 | util_d$1_curry as curry,
|
8849 | util_d$1_isArray as isArray,
|
8850 | util_d$1_isString as isString,
|
8851 | util_d$1_isObject as isObject,
|
8852 | util_d$1_isFunction as isFunction,
|
8853 | util_d$1_extend as extend,
|
8854 | util_d$1_defaults as defaults,
|
8855 | util_d$1_clone as clone,
|
8856 | util_d$1_merge as merge,
|
8857 | };
|
8858 | }
|
8859 |
|
8860 | declare class Browser {
|
8861 | firefox: boolean;
|
8862 | ie: boolean;
|
8863 | edge: boolean;
|
8864 | newEdge: boolean;
|
8865 | weChat: boolean;
|
8866 | version: string | number;
|
8867 | }
|
8868 | declare class Env {
|
8869 | browser: Browser;
|
8870 | node: boolean;
|
8871 | wxa: boolean;
|
8872 | worker: boolean;
|
8873 | svgSupported: boolean;
|
8874 | touchEventsSupported: boolean;
|
8875 | pointerEventsSupported: boolean;
|
8876 | domSupported: boolean;
|
8877 | transformSupported: boolean;
|
8878 | transform3dSupported: boolean;
|
8879 | hasGlobalWindow: boolean;
|
8880 | }
|
8881 | declare const env: Env;
|
8882 |
|
8883 | declare function brushSingle(ctx: CanvasRenderingContext2D, el: Displayable): void;
|
8884 |
|
8885 | declare function extendComponentModel(proto: object): ComponentModel;
|
8886 | declare function extendComponentView(proto: object): ChartView;
|
8887 | declare function extendSeriesModel(proto: object): SeriesModel;
|
8888 | declare function extendChartView(proto: object): ChartView;
|
8889 |
|
8890 | declare type ParallelLayoutDirection = 'horizontal' | 'vertical';
|
8891 | interface ParallelCoordinateSystemOption extends ComponentOption, BoxLayoutOptionMixin {
|
8892 | mainType?: 'parallel';
|
8893 | layout?: ParallelLayoutDirection;
|
8894 | axisExpandable?: boolean;
|
8895 | axisExpandCenter?: number;
|
8896 | axisExpandCount?: number;
|
8897 | axisExpandWidth?: number;
|
8898 | axisExpandTriggerOn?: 'click' | 'mousemove';
|
8899 | axisExpandRate?: number;
|
8900 | axisExpandDebounce?: number;
|
8901 | axisExpandSlideTriggerArea?: [number, number, number];
|
8902 | axisExpandWindow?: number[];
|
8903 | parallelAxisDefault?: ParallelAxisOption;
|
8904 | }
|
8905 |
|
8906 | declare type ParallelAxisOption = AxisBaseOption & {
|
8907 | |
8908 |
|
8909 |
|
8910 | dim?: number | number[];
|
8911 | parallelIndex?: number;
|
8912 | areaSelectStyle?: {
|
8913 | width?: number;
|
8914 | borderWidth?: number;
|
8915 | borderColor?: ZRColor;
|
8916 | color?: ZRColor;
|
8917 | opacity?: number;
|
8918 | };
|
8919 | realtime?: boolean;
|
8920 | };
|
8921 |
|
8922 | declare type Dependencies = {
|
8923 | grid: XAXisOption | YAXisOption | AxisPointerOption;
|
8924 | polar: AngleAxisOption | RadiusAxisOption;
|
8925 | parallel: ParallelAxisOption;
|
8926 | };
|
8927 | declare type DependenciesKeys = keyof Dependencies & string;
|
8928 | declare type Arrayable<T> = T | T[];
|
8929 | declare type GetMainType<OptionUnion extends ComponentOption> = Exclude<OptionUnion['mainType'], undefined>;
|
8930 | declare type ExtractComponentOption<OptionUnion, ExtractMainType> = OptionUnion extends {
|
8931 | mainType?: ExtractMainType;
|
8932 | } ? OptionUnion : never;
|
8933 | declare type GetDependency<DependencyOption extends ComponentOption> = {
|
8934 | [key in GetMainType<DependencyOption>]?: Arrayable<ExtractComponentOption<DependencyOption, key>>;
|
8935 | };
|
8936 | declare type GetDependencies<MainType extends string> = GetDependency<Dependencies[Extract<MainType, DependenciesKeys>]>;
|
8937 | declare type ComposeUnitOption<OptionUnion extends ComponentOption> = CheckMainType<GetMainType<OptionUnion>> & Omit<ECBasicOption, 'baseOption' | 'options'> & {
|
8938 | [key in GetMainType<OptionUnion>]?: Arrayable<ExtractComponentOption<OptionUnion, key>>;
|
8939 | } & GetDependencies<GetMainType<OptionUnion>>;
|
8940 | declare type CheckMainType<OptionUnionMainType extends string> = string extends OptionUnionMainType ? never : {};
|
8941 | declare type ComposeOption<OptionUnion extends ComponentOption> = ComposeUnitOption<OptionUnion> & {
|
8942 | baseOption?: ComposeUnitOption<OptionUnion>;
|
8943 | options?: ComposeUnitOption<OptionUnion>[];
|
8944 | };
|
8945 |
|
8946 | interface RadarIndicatorOption {
|
8947 | name?: string;
|
8948 | |
8949 |
|
8950 |
|
8951 | text?: string;
|
8952 | min?: number;
|
8953 | max?: number;
|
8954 | color?: ColorString;
|
8955 | axisType?: 'value' | 'log';
|
8956 | }
|
8957 | interface RadarOption extends ComponentOption, CircleLayoutOptionMixin {
|
8958 | mainType?: 'radar';
|
8959 | startAngle?: number;
|
8960 | shape?: 'polygon' | 'circle';
|
8961 | axisLine?: AxisBaseOption['axisLine'];
|
8962 | axisTick?: AxisBaseOption['axisTick'];
|
8963 | axisLabel?: AxisBaseOption['axisLabel'];
|
8964 | splitLine?: AxisBaseOption['splitLine'];
|
8965 | splitArea?: AxisBaseOption['splitArea'];
|
8966 | axisName?: {
|
8967 | show?: boolean;
|
8968 | formatter?: string | ((name?: string, indicatorOpt?: InnerIndicatorAxisOption) => string);
|
8969 | } & LabelOption;
|
8970 | axisNameGap?: number;
|
8971 | triggerEvent?: boolean;
|
8972 | scale?: boolean;
|
8973 | splitNumber?: number;
|
8974 | boundaryGap?: CategoryAxisBaseOption['boundaryGap'] | ValueAxisBaseOption['boundaryGap'];
|
8975 | indicator?: RadarIndicatorOption[];
|
8976 | }
|
8977 | declare type InnerIndicatorAxisOption = AxisBaseOption & {
|
8978 | showName?: boolean;
|
8979 | };
|
8980 |
|
8981 | declare type SingleAxisPosition = 'top' | 'bottom' | 'left' | 'right';
|
8982 | declare type SingleAxisOption = AxisBaseOption & BoxLayoutOptionMixin & {
|
8983 | mainType?: 'singleAxis';
|
8984 | position?: SingleAxisPosition;
|
8985 | orient?: LayoutOrient;
|
8986 | };
|
8987 |
|
8988 | interface CalendarMonthLabelFormatterCallbackParams {
|
8989 | nameMap: string;
|
8990 | yyyy: string;
|
8991 | yy: string;
|
8992 | |
8993 |
|
8994 |
|
8995 | MM: string;
|
8996 | |
8997 |
|
8998 |
|
8999 | M: number;
|
9000 | }
|
9001 | interface CalendarYearLabelFormatterCallbackParams {
|
9002 | nameMap: string;
|
9003 | |
9004 |
|
9005 |
|
9006 | start: string;
|
9007 | |
9008 |
|
9009 |
|
9010 | end: string;
|
9011 | }
|
9012 | interface CalendarOption extends ComponentOption, BoxLayoutOptionMixin {
|
9013 | mainType?: 'calendar';
|
9014 | cellSize?: number | 'auto' | (number | 'auto')[];
|
9015 | orient?: LayoutOrient;
|
9016 | splitLine?: {
|
9017 | show?: boolean;
|
9018 | lineStyle?: LineStyleOption;
|
9019 | };
|
9020 | itemStyle?: ItemStyleOption;
|
9021 | |
9022 |
|
9023 |
|
9024 |
|
9025 |
|
9026 |
|
9027 |
|
9028 |
|
9029 |
|
9030 |
|
9031 | range?: OptionDataValueDate | (OptionDataValueDate)[];
|
9032 | dayLabel?: Omit<LabelOption, 'position'> & {
|
9033 | |
9034 |
|
9035 |
|
9036 | firstDay?: number;
|
9037 | |
9038 |
|
9039 |
|
9040 |
|
9041 | margin?: number | string;
|
9042 | |
9043 |
|
9044 |
|
9045 | position?: 'start' | 'end';
|
9046 | |
9047 |
|
9048 |
|
9049 |
|
9050 |
|
9051 |
|
9052 |
|
9053 | nameMap?: string | string[];
|
9054 | };
|
9055 | monthLabel?: Omit<LabelOption, 'position'> & {
|
9056 | |
9057 |
|
9058 |
|
9059 | margin?: number;
|
9060 | |
9061 |
|
9062 |
|
9063 | position?: 'start' | 'end';
|
9064 | |
9065 |
|
9066 |
|
9067 |
|
9068 |
|
9069 |
|
9070 |
|
9071 | nameMap?: string | string[];
|
9072 | formatter?: string | ((params: CalendarMonthLabelFormatterCallbackParams) => string);
|
9073 | };
|
9074 | yearLabel?: Omit<LabelOption, 'position'> & {
|
9075 | |
9076 |
|
9077 |
|
9078 | margin?: number;
|
9079 | |
9080 |
|
9081 |
|
9082 | position?: 'top' | 'bottom' | 'left' | 'right';
|
9083 | formatter?: string | ((params: CalendarYearLabelFormatterCallbackParams) => string);
|
9084 | };
|
9085 | }
|
9086 |
|
9087 | declare type IconStyle = ItemStyleOption & {
|
9088 | textFill?: LabelOption['color'];
|
9089 | textBackgroundColor?: LabelOption['backgroundColor'];
|
9090 | textPosition?: LabelOption['position'];
|
9091 | textAlign?: LabelOption['align'];
|
9092 | textBorderRadius?: LabelOption['borderRadius'];
|
9093 | textPadding?: LabelOption['padding'];
|
9094 | textFontFamily?: LabelOption['fontFamily'];
|
9095 | textFontSize?: LabelOption['fontSize'];
|
9096 | textFontWeight?: LabelOption['fontWeight'];
|
9097 | textFontStyle?: LabelOption['fontStyle'];
|
9098 | };
|
9099 | interface ToolboxFeatureOption {
|
9100 | show?: boolean;
|
9101 | title?: string | Partial<Dictionary<string>>;
|
9102 | icon?: string | Partial<Dictionary<string>>;
|
9103 | iconStyle?: IconStyle;
|
9104 | emphasis?: {
|
9105 | iconStyle?: IconStyle;
|
9106 | };
|
9107 | iconStatus?: Partial<Dictionary<DisplayState>>;
|
9108 | onclick?: () => void;
|
9109 | }
|
9110 |
|
9111 | interface ToolboxTooltipFormatterParams {
|
9112 | componentType: 'toolbox';
|
9113 | name: string;
|
9114 | title: string;
|
9115 | $vars: ['name', 'title'];
|
9116 | }
|
9117 | interface ToolboxOption extends ComponentOption, BoxLayoutOptionMixin, BorderOptionMixin {
|
9118 | mainType?: 'toolbox';
|
9119 | show?: boolean;
|
9120 | orient?: LayoutOrient;
|
9121 | backgroundColor?: ZRColor;
|
9122 | borderRadius?: number | number[];
|
9123 | padding?: number | number[];
|
9124 | itemSize?: number;
|
9125 | itemGap?: number;
|
9126 | showTitle?: boolean;
|
9127 | iconStyle?: ItemStyleOption;
|
9128 | emphasis?: {
|
9129 | iconStyle?: ItemStyleOption;
|
9130 | };
|
9131 | textStyle?: LabelOption;
|
9132 | tooltip?: CommonTooltipOption<ToolboxTooltipFormatterParams>;
|
9133 | |
9134 |
|
9135 |
|
9136 | feature?: Partial<Dictionary<ToolboxFeatureOption>>;
|
9137 | }
|
9138 |
|
9139 | interface TitleOption extends ComponentOption, BoxLayoutOptionMixin, BorderOptionMixin {
|
9140 | mainType?: 'title';
|
9141 | show?: boolean;
|
9142 | text?: string;
|
9143 | |
9144 |
|
9145 |
|
9146 | link?: string;
|
9147 | target?: 'self' | 'blank';
|
9148 | subtext?: string;
|
9149 | sublink?: string;
|
9150 | subtarget?: 'self' | 'blank';
|
9151 | textAlign?: ZRTextAlign;
|
9152 | textVerticalAlign?: ZRTextVerticalAlign;
|
9153 | |
9154 |
|
9155 |
|
9156 | textBaseline?: ZRTextVerticalAlign;
|
9157 | backgroundColor?: ZRColor;
|
9158 | |
9159 |
|
9160 |
|
9161 |
|
9162 | padding?: number | number[];
|
9163 | |
9164 |
|
9165 |
|
9166 | itemGap?: number;
|
9167 | textStyle?: LabelOption;
|
9168 | subtextStyle?: LabelOption;
|
9169 | |
9170 |
|
9171 |
|
9172 | triggerEvent?: boolean;
|
9173 | |
9174 |
|
9175 |
|
9176 | borderRadius?: number | number[];
|
9177 | }
|
9178 |
|
9179 | interface TimelineControlStyle extends ItemStyleOption {
|
9180 | show?: boolean;
|
9181 | showPlayBtn?: boolean;
|
9182 | showPrevBtn?: boolean;
|
9183 | showNextBtn?: boolean;
|
9184 | itemSize?: number;
|
9185 | itemGap?: number;
|
9186 | position?: 'left' | 'right' | 'top' | 'bottom';
|
9187 | playIcon?: string;
|
9188 | stopIcon?: string;
|
9189 | prevIcon?: string;
|
9190 | nextIcon?: string;
|
9191 | playBtnSize?: number | string;
|
9192 | stopBtnSize?: number | string;
|
9193 | nextBtnSize?: number | string;
|
9194 | prevBtnSize?: number | string;
|
9195 | }
|
9196 | interface TimelineCheckpointStyle extends ItemStyleOption, SymbolOptionMixin {
|
9197 | animation?: boolean;
|
9198 | animationDuration?: number;
|
9199 | animationEasing?: ZREasing;
|
9200 | }
|
9201 | interface TimelineLineStyleOption extends LineStyleOption {
|
9202 | show?: boolean;
|
9203 | }
|
9204 | interface TimelineLabelOption extends Omit<LabelOption, 'position'> {
|
9205 | show?: boolean;
|
9206 | position?: 'auto' | 'left' | 'right' | 'top' | 'bottom' | number;
|
9207 | interval?: 'auto' | number;
|
9208 | formatter?: string | ((value: string | number, index: number) => string);
|
9209 | }
|
9210 | interface TimelineDataItemOption extends SymbolOptionMixin {
|
9211 | value?: OptionDataValue;
|
9212 | itemStyle?: ItemStyleOption;
|
9213 | label?: TimelineLabelOption;
|
9214 | checkpointStyle?: TimelineCheckpointStyle;
|
9215 | emphasis?: {
|
9216 | itemStyle?: ItemStyleOption;
|
9217 | label?: TimelineLabelOption;
|
9218 | checkpointStyle?: TimelineCheckpointStyle;
|
9219 | };
|
9220 | progress?: {
|
9221 | lineStyle?: TimelineLineStyleOption;
|
9222 | itemStyle?: ItemStyleOption;
|
9223 | label?: TimelineLabelOption;
|
9224 | };
|
9225 | tooltip?: boolean;
|
9226 | }
|
9227 | interface TimelineOption extends ComponentOption, BoxLayoutOptionMixin, SymbolOptionMixin {
|
9228 | mainType?: 'timeline';
|
9229 | backgroundColor?: ZRColor;
|
9230 | borderColor?: ColorString;
|
9231 | borderWidth?: number;
|
9232 | tooltip?: CommonTooltipOption<CallbackDataParams> & {
|
9233 | trigger?: 'item';
|
9234 | };
|
9235 | show?: boolean;
|
9236 | axisType?: 'category' | 'time' | 'value';
|
9237 | currentIndex?: number;
|
9238 | autoPlay?: boolean;
|
9239 | rewind?: boolean;
|
9240 | loop?: boolean;
|
9241 | playInterval?: number;
|
9242 | realtime?: boolean;
|
9243 | controlPosition?: 'left' | 'right' | 'top' | 'bottom';
|
9244 | padding?: number | number[];
|
9245 | orient?: LayoutOrient;
|
9246 | inverse?: boolean;
|
9247 | replaceMerge?: GlobalModelSetOptionOpts['replaceMerge'];
|
9248 | lineStyle?: TimelineLineStyleOption;
|
9249 | itemStyle?: ItemStyleOption;
|
9250 | checkpointStyle?: TimelineCheckpointStyle;
|
9251 | controlStyle?: TimelineControlStyle;
|
9252 | label?: TimelineLabelOption;
|
9253 | emphasis?: {
|
9254 | lineStyle?: TimelineLineStyleOption;
|
9255 | itemStyle?: ItemStyleOption;
|
9256 | checkpointStyle?: TimelineCheckpointStyle;
|
9257 | controlStyle?: TimelineControlStyle;
|
9258 | label?: TimelineLabelOption;
|
9259 | };
|
9260 | progress?: {
|
9261 | lineStyle?: TimelineLineStyleOption;
|
9262 | itemStyle?: ItemStyleOption;
|
9263 | label?: TimelineLabelOption;
|
9264 | };
|
9265 | data?: (OptionDataValue | TimelineDataItemOption)[];
|
9266 | }
|
9267 |
|
9268 | interface SliderTimelineOption extends TimelineOption {
|
9269 | }
|
9270 |
|
9271 | interface ScrollableLegendOption extends LegendOption {
|
9272 | scrollDataIndex?: number;
|
9273 | |
9274 |
|
9275 |
|
9276 | pageButtonItemGap?: number;
|
9277 | |
9278 |
|
9279 |
|
9280 | pageButtonGap?: number;
|
9281 | pageButtonPosition?: 'start' | 'end';
|
9282 | pageFormatter?: string | ((param: {
|
9283 | current: number;
|
9284 | total: number;
|
9285 | }) => string);
|
9286 | pageIcons?: {
|
9287 | horizontal?: string[];
|
9288 | vertical?: string[];
|
9289 | };
|
9290 | pageIconColor?: ZRColor;
|
9291 | pageIconInactiveColor?: ZRColor;
|
9292 | pageIconSize?: number;
|
9293 | pageTextStyle?: LabelOption;
|
9294 | animationDurationUpdate?: number;
|
9295 | }
|
9296 |
|
9297 | interface DataZoomOption extends ComponentOption {
|
9298 | mainType?: 'dataZoom';
|
9299 | |
9300 |
|
9301 |
|
9302 | orient?: LayoutOrient;
|
9303 | |
9304 |
|
9305 |
|
9306 | xAxisIndex?: number | number[];
|
9307 | xAxisId?: string | string[];
|
9308 | |
9309 |
|
9310 |
|
9311 | yAxisIndex?: number | number[];
|
9312 | yAxisId?: string | string[];
|
9313 | radiusAxisIndex?: number | number[];
|
9314 | radiusAxisId?: string | string[];
|
9315 | angleAxisIndex?: number | number[];
|
9316 | angleAxisId?: string | string[];
|
9317 | singleAxisIndex?: number | number[];
|
9318 | singleAxisId?: string | string[];
|
9319 | |
9320 |
|
9321 |
|
9322 |
|
9323 |
|
9324 |
|
9325 |
|
9326 |
|
9327 |
|
9328 |
|
9329 |
|
9330 |
|
9331 |
|
9332 |
|
9333 |
|
9334 |
|
9335 |
|
9336 | filterMode?: 'filter' | 'weakFilter' | 'empty' | 'none';
|
9337 | |
9338 |
|
9339 |
|
9340 |
|
9341 |
|
9342 |
|
9343 | throttle?: number | null | undefined;
|
9344 | |
9345 |
|
9346 |
|
9347 | start?: number;
|
9348 | |
9349 |
|
9350 |
|
9351 | end?: number;
|
9352 | |
9353 |
|
9354 |
|
9355 | startValue?: number | string | Date;
|
9356 | |
9357 |
|
9358 |
|
9359 | endValue?: number | string | Date;
|
9360 | |
9361 |
|
9362 |
|
9363 |
|
9364 | minSpan?: number;
|
9365 | |
9366 |
|
9367 |
|
9368 |
|
9369 | maxSpan?: number;
|
9370 | minValueSpan?: number;
|
9371 | maxValueSpan?: number;
|
9372 | rangeMode?: ['value' | 'percent', 'value' | 'percent'];
|
9373 | realtime?: boolean;
|
9374 | textStyle?: LabelOption;
|
9375 | }
|
9376 |
|
9377 | interface SliderDataZoomOption extends DataZoomOption, BoxLayoutOptionMixin {
|
9378 | show?: boolean;
|
9379 | |
9380 |
|
9381 |
|
9382 | |
9383 |
|
9384 |
|
9385 | backgroundColor?: ZRColor;
|
9386 | |
9387 |
|
9388 |
|
9389 | |
9390 |
|
9391 |
|
9392 |
|
9393 |
|
9394 | borderColor?: ZRColor;
|
9395 | |
9396 |
|
9397 |
|
9398 | borderRadius?: number | number[];
|
9399 | dataBackground?: {
|
9400 | lineStyle?: LineStyleOption;
|
9401 | areaStyle?: AreaStyleOption;
|
9402 | };
|
9403 | selectedDataBackground?: {
|
9404 | lineStyle?: LineStyleOption;
|
9405 | areaStyle?: AreaStyleOption;
|
9406 | };
|
9407 | |
9408 |
|
9409 |
|
9410 | fillerColor?: ZRColor;
|
9411 | |
9412 |
|
9413 |
|
9414 | handleIcon?: string;
|
9415 | |
9416 |
|
9417 |
|
9418 |
|
9419 | handleSize?: string | number;
|
9420 | handleStyle?: ItemStyleOption;
|
9421 | |
9422 |
|
9423 |
|
9424 | moveHandleIcon?: string;
|
9425 | moveHandleStyle?: ItemStyleOption;
|
9426 | |
9427 |
|
9428 |
|
9429 | moveHandleSize?: number;
|
9430 | labelPrecision?: number | 'auto';
|
9431 | labelFormatter?: string | ((value: number, valueStr: string) => string);
|
9432 | showDetail?: boolean;
|
9433 | showDataShadow?: 'auto' | boolean;
|
9434 | zoomLock?: boolean;
|
9435 | textStyle?: LabelOption;
|
9436 | |
9437 |
|
9438 |
|
9439 | brushSelect?: boolean;
|
9440 | brushStyle?: ItemStyleOption;
|
9441 | emphasis?: {
|
9442 | handleStyle?: ItemStyleOption;
|
9443 | moveHandleStyle?: ItemStyleOption;
|
9444 | };
|
9445 | }
|
9446 |
|
9447 | interface InsideDataZoomOption extends DataZoomOption {
|
9448 | |
9449 |
|
9450 |
|
9451 | disabled?: boolean;
|
9452 | |
9453 |
|
9454 |
|
9455 | zoomLock?: boolean;
|
9456 | zoomOnMouseWheel?: boolean | 'shift' | 'ctrl' | 'alt';
|
9457 | moveOnMouseMove?: boolean | 'shift' | 'ctrl' | 'alt';
|
9458 | moveOnMouseWheel?: boolean | 'shift' | 'ctrl' | 'alt';
|
9459 | preventDefaultMouseMove?: boolean;
|
9460 | |
9461 |
|
9462 |
|
9463 | textStyle?: never;
|
9464 | }
|
9465 |
|
9466 | interface ContinousVisualMapOption extends VisualMapOption {
|
9467 | align?: 'auto' | 'left' | 'right' | 'top' | 'bottom';
|
9468 | |
9469 |
|
9470 |
|
9471 |
|
9472 | calculable?: boolean;
|
9473 | |
9474 |
|
9475 |
|
9476 |
|
9477 |
|
9478 | range?: number[];
|
9479 | |
9480 |
|
9481 |
|
9482 | hoverLink?: boolean;
|
9483 | |
9484 |
|
9485 |
|
9486 | hoverLinkDataSize?: number;
|
9487 | |
9488 |
|
9489 |
|
9490 |
|
9491 | hoverLinkOnHandle?: boolean;
|
9492 | handleIcon?: string;
|
9493 | handleSize?: string | number;
|
9494 | handleStyle?: ItemStyleOption;
|
9495 | indicatorIcon?: string;
|
9496 | indicatorSize?: string | number;
|
9497 | indicatorStyle?: ItemStyleOption;
|
9498 | emphasis?: {
|
9499 | handleStyle?: ItemStyleOption;
|
9500 | };
|
9501 | }
|
9502 |
|
9503 | interface VisualPiece extends VisualOptionPiecewise {
|
9504 | min?: number;
|
9505 | max?: number;
|
9506 | lt?: number;
|
9507 | gt?: number;
|
9508 | lte?: number;
|
9509 | gte?: number;
|
9510 | value?: number;
|
9511 | label?: string;
|
9512 | }
|
9513 |
|
9514 |
|
9515 |
|
9516 |
|
9517 |
|
9518 |
|
9519 |
|
9520 |
|
9521 |
|
9522 |
|
9523 |
|
9524 |
|
9525 |
|
9526 |
|
9527 |
|
9528 |
|
9529 |
|
9530 |
|
9531 |
|
9532 | interface PiecewiseVisualMapOption extends VisualMapOption {
|
9533 | align?: 'auto' | 'left' | 'right';
|
9534 | minOpen?: boolean;
|
9535 | maxOpen?: boolean;
|
9536 | |
9537 |
|
9538 |
|
9539 |
|
9540 |
|
9541 |
|
9542 | itemWidth?: number;
|
9543 | itemHeight?: number;
|
9544 | itemSymbol?: string;
|
9545 | pieces?: VisualPiece[];
|
9546 | |
9547 |
|
9548 |
|
9549 |
|
9550 | categories?: string[];
|
9551 | |
9552 |
|
9553 |
|
9554 |
|
9555 |
|
9556 |
|
9557 | splitNumber?: number;
|
9558 | |
9559 |
|
9560 |
|
9561 |
|
9562 | selected?: Dictionary<boolean>;
|
9563 | selectedMode?: 'multiple' | 'single' | boolean;
|
9564 | |
9565 |
|
9566 |
|
9567 |
|
9568 | showLabel?: boolean;
|
9569 | itemGap?: number;
|
9570 | hoverLink?: boolean;
|
9571 | }
|
9572 |
|
9573 | interface MarkLineStateOption {
|
9574 | lineStyle?: LineStyleOption;
|
9575 | |
9576 |
|
9577 |
|
9578 | itemStyle?: ItemStyleOption;
|
9579 | label?: SeriesLineLabelOption;
|
9580 | }
|
9581 | interface MarkLineDataItemOptionBase extends MarkLineStateOption, StatesOptionMixin<MarkLineStateOption, StatesMixinBase> {
|
9582 | name?: string;
|
9583 | }
|
9584 | interface MarkLine1DDataItemOption extends MarkLineDataItemOptionBase {
|
9585 | xAxis?: number | string;
|
9586 | yAxis?: number | string;
|
9587 | type?: MarkerStatisticType;
|
9588 | |
9589 |
|
9590 |
|
9591 |
|
9592 | valueIndex?: number;
|
9593 | valueDim?: string;
|
9594 | |
9595 |
|
9596 |
|
9597 | symbol?: string[] | string;
|
9598 | symbolSize?: number[] | number;
|
9599 | symbolRotate?: number[] | number;
|
9600 | symbolOffset?: number | string | (number | string)[];
|
9601 | }
|
9602 | interface MarkLine2DDataItemDimOption extends MarkLineDataItemOptionBase, SymbolOptionMixin, MarkerPositionOption {
|
9603 | }
|
9604 | declare type MarkLine2DDataItemOption = [
|
9605 | MarkLine2DDataItemDimOption,
|
9606 | MarkLine2DDataItemDimOption
|
9607 | ];
|
9608 | interface MarkLineOption extends MarkerOption, MarkLineStateOption, StatesOptionMixin<MarkLineStateOption, StatesMixinBase> {
|
9609 | mainType?: 'markLine';
|
9610 | symbol?: string[] | string;
|
9611 | symbolSize?: number[] | number;
|
9612 | symbolRotate?: number[] | number;
|
9613 | symbolOffset?: number | string | (number | string)[];
|
9614 | |
9615 |
|
9616 |
|
9617 | precision?: number;
|
9618 | data?: (MarkLine1DDataItemOption | MarkLine2DDataItemOption)[];
|
9619 | }
|
9620 |
|
9621 | interface MarkPointStateOption {
|
9622 | itemStyle?: ItemStyleOption;
|
9623 | label?: SeriesLabelOption;
|
9624 | }
|
9625 | interface MarkPointDataItemOption extends MarkPointStateOption, StatesOptionMixin<MarkPointStateOption, StatesMixinBase>, SymbolOptionMixin<CallbackDataParams>, MarkerPositionOption {
|
9626 | name: string;
|
9627 | }
|
9628 | interface MarkPointOption extends MarkerOption, SymbolOptionMixin<CallbackDataParams>, StatesOptionMixin<MarkPointStateOption, StatesMixinBase>, MarkPointStateOption {
|
9629 | mainType?: 'markPoint';
|
9630 | precision?: number;
|
9631 | data?: MarkPointDataItemOption[];
|
9632 | }
|
9633 |
|
9634 | declare type LineDataValue = OptionDataValue | OptionDataValue[];
|
9635 | interface LineStateOptionMixin {
|
9636 | emphasis?: {
|
9637 | focus?: DefaultEmphasisFocus;
|
9638 | scale?: boolean | number;
|
9639 | };
|
9640 | }
|
9641 | interface LineStateOption<TCbParams = never> {
|
9642 | itemStyle?: ItemStyleOption<TCbParams>;
|
9643 | label?: SeriesLabelOption;
|
9644 | endLabel?: LineEndLabelOption;
|
9645 | }
|
9646 | interface LineDataItemOption extends SymbolOptionMixin, LineStateOption, StatesOptionMixin<LineStateOption, LineStateOptionMixin> {
|
9647 | name?: string;
|
9648 | value?: LineDataValue;
|
9649 | }
|
9650 | interface LineEndLabelOption extends SeriesLabelOption {
|
9651 | valueAnimation?: boolean;
|
9652 | }
|
9653 | interface LineSeriesOption extends SeriesOption<LineStateOption<CallbackDataParams>, LineStateOptionMixin & {
|
9654 | emphasis?: {
|
9655 | lineStyle?: Omit<LineStyleOption, 'width'> & {
|
9656 | width?: LineStyleOption['width'] | 'bolder';
|
9657 | };
|
9658 | areaStyle?: AreaStyleOption;
|
9659 | };
|
9660 | blur?: {
|
9661 | lineStyle?: LineStyleOption;
|
9662 | areaStyle?: AreaStyleOption;
|
9663 | };
|
9664 | }>, LineStateOption<CallbackDataParams>, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesStackOptionMixin, SeriesSamplingOptionMixin, SymbolOptionMixin<CallbackDataParams>, SeriesEncodeOptionMixin {
|
9665 | type?: 'line';
|
9666 | coordinateSystem?: 'cartesian2d' | 'polar';
|
9667 | clip?: boolean;
|
9668 | label?: SeriesLabelOption;
|
9669 | endLabel?: LineEndLabelOption;
|
9670 | lineStyle?: LineStyleOption;
|
9671 | areaStyle?: AreaStyleOption & {
|
9672 | origin?: 'auto' | 'start' | 'end' | number;
|
9673 | };
|
9674 | step?: false | 'start' | 'end' | 'middle';
|
9675 | smooth?: boolean | number;
|
9676 | smoothMonotone?: 'x' | 'y' | 'none';
|
9677 | connectNulls?: boolean;
|
9678 | showSymbol?: boolean;
|
9679 | showAllSymbol?: 'auto' | boolean;
|
9680 | data?: (LineDataValue | LineDataItemOption)[];
|
9681 | triggerLineEvent?: boolean;
|
9682 | }
|
9683 |
|
9684 | interface ScatterStateOption<TCbParams = never> {
|
9685 | itemStyle?: ItemStyleOption<TCbParams>;
|
9686 | label?: SeriesLabelOption;
|
9687 | }
|
9688 | interface ScatterStatesOptionMixin {
|
9689 | emphasis?: {
|
9690 | focus?: DefaultEmphasisFocus;
|
9691 | scale?: boolean | number;
|
9692 | };
|
9693 | }
|
9694 | interface ScatterDataItemOption extends SymbolOptionMixin, ScatterStateOption, StatesOptionMixin<ScatterStateOption, ScatterStatesOptionMixin>, OptionDataItemObject<OptionDataValue> {
|
9695 | }
|
9696 | interface ScatterSeriesOption extends SeriesOption<ScatterStateOption<CallbackDataParams>, ScatterStatesOptionMixin>, ScatterStateOption<CallbackDataParams>, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SeriesLargeOptionMixin, SeriesStackOptionMixin, SymbolOptionMixin<CallbackDataParams>, SeriesEncodeOptionMixin {
|
9697 | type?: 'scatter';
|
9698 | coordinateSystem?: string;
|
9699 | cursor?: string;
|
9700 | clip?: boolean;
|
9701 | data?: (ScatterDataItemOption | OptionDataValue | OptionDataValue[])[] | ArrayLike<number>;
|
9702 | }
|
9703 |
|
9704 | interface PieItemStyleOption<TCbParams = never> extends ItemStyleOption<TCbParams> {
|
9705 | borderRadius?: (number | string)[] | number | string;
|
9706 | }
|
9707 | interface PieCallbackDataParams extends CallbackDataParams {
|
9708 | percent: number;
|
9709 | }
|
9710 | interface PieStateOption<TCbParams = never> {
|
9711 | itemStyle?: PieItemStyleOption<TCbParams>;
|
9712 | label?: PieLabelOption;
|
9713 | labelLine?: PieLabelLineOption;
|
9714 | }
|
9715 | interface PieLabelOption extends Omit<SeriesLabelOption, 'rotate' | 'position'> {
|
9716 | rotate?: number | boolean | 'radial' | 'tangential';
|
9717 | alignTo?: 'none' | 'labelLine' | 'edge';
|
9718 | edgeDistance?: string | number;
|
9719 | |
9720 |
|
9721 |
|
9722 | margin?: string | number;
|
9723 | bleedMargin?: number;
|
9724 | distanceToLabelLine?: number;
|
9725 | position?: SeriesLabelOption['position'] | 'outer' | 'inner' | 'center' | 'outside';
|
9726 | }
|
9727 | interface PieLabelLineOption extends LabelLineOption {
|
9728 | |
9729 |
|
9730 |
|
9731 |
|
9732 | maxSurfaceAngle?: number;
|
9733 | }
|
9734 | interface ExtraStateOption {
|
9735 | emphasis?: {
|
9736 | focus?: DefaultEmphasisFocus;
|
9737 | scale?: boolean;
|
9738 | scaleSize?: number;
|
9739 | };
|
9740 | }
|
9741 | interface PieDataItemOption extends OptionDataItemObject<OptionDataValueNumeric>, PieStateOption, StatesOptionMixin<PieStateOption, ExtraStateOption> {
|
9742 | cursor?: string;
|
9743 | }
|
9744 | interface PieSeriesOption extends Omit<SeriesOption<PieStateOption<PieCallbackDataParams>, ExtraStateOption>, 'labelLine'>, PieStateOption<PieCallbackDataParams>, Omit<CircleLayoutOptionMixin, 'center'>, BoxLayoutOptionMixin, SeriesEncodeOptionMixin {
|
9745 | type?: 'pie';
|
9746 | roseType?: 'radius' | 'area';
|
9747 | center?: string | number | (string | number)[];
|
9748 | clockwise?: boolean;
|
9749 | startAngle?: number;
|
9750 | endAngle?: number | 'auto';
|
9751 | padAngle?: number;
|
9752 | minAngle?: number;
|
9753 | minShowLabelAngle?: number;
|
9754 | selectedOffset?: number;
|
9755 | avoidLabelOverlap?: boolean;
|
9756 | percentPrecision?: number;
|
9757 | stillShowZeroSum?: boolean;
|
9758 | animationType?: 'expansion' | 'scale';
|
9759 | animationTypeUpdate?: 'transition' | 'expansion';
|
9760 | showEmptyCircle?: boolean;
|
9761 | emptyCircleStyle?: PieItemStyleOption;
|
9762 | data?: (OptionDataValueNumeric | OptionDataValueNumeric[] | PieDataItemOption)[];
|
9763 | }
|
9764 |
|
9765 | declare type RadarSeriesDataValue = OptionDataValue[];
|
9766 | interface RadarStatesMixin {
|
9767 | emphasis?: DefaultStatesMixinEmphasis;
|
9768 | }
|
9769 | interface RadarSeriesStateOption<TCbParams = never> {
|
9770 | lineStyle?: LineStyleOption;
|
9771 | areaStyle?: AreaStyleOption;
|
9772 | label?: SeriesLabelOption;
|
9773 | itemStyle?: ItemStyleOption<TCbParams>;
|
9774 | }
|
9775 | interface RadarSeriesDataItemOption extends SymbolOptionMixin, RadarSeriesStateOption<CallbackDataParams>, StatesOptionMixin<RadarSeriesStateOption<CallbackDataParams>, RadarStatesMixin>, OptionDataItemObject<RadarSeriesDataValue> {
|
9776 | }
|
9777 | interface RadarSeriesOption extends SeriesOption<RadarSeriesStateOption, RadarStatesMixin>, RadarSeriesStateOption, SymbolOptionMixin<CallbackDataParams>, SeriesEncodeOptionMixin {
|
9778 | type?: 'radar';
|
9779 | coordinateSystem?: 'radar';
|
9780 | radarIndex?: number;
|
9781 | radarId?: string;
|
9782 | data?: (RadarSeriesDataItemOption | RadarSeriesDataValue)[];
|
9783 | }
|
9784 |
|
9785 | interface CurveLineStyleOption extends LineStyleOption {
|
9786 | curveness?: number;
|
9787 | }
|
9788 | interface TreeSeriesStateOption<TCbParams = never> {
|
9789 | itemStyle?: ItemStyleOption<TCbParams>;
|
9790 | |
9791 |
|
9792 |
|
9793 | lineStyle?: CurveLineStyleOption;
|
9794 | label?: SeriesLabelOption;
|
9795 | }
|
9796 | interface TreeStatesMixin {
|
9797 | emphasis?: {
|
9798 | focus?: DefaultEmphasisFocus | 'ancestor' | 'descendant' | 'relative';
|
9799 | scale?: boolean;
|
9800 | };
|
9801 | }
|
9802 | interface TreeSeriesNodeItemOption extends SymbolOptionMixin<CallbackDataParams>, TreeSeriesStateOption<CallbackDataParams>, StatesOptionMixin<TreeSeriesStateOption<CallbackDataParams>, TreeStatesMixin>, OptionDataItemObject<OptionDataValue> {
|
9803 | children?: TreeSeriesNodeItemOption[];
|
9804 | collapsed?: boolean;
|
9805 | link?: string;
|
9806 | target?: string;
|
9807 | }
|
9808 |
|
9809 |
|
9810 |
|
9811 | interface TreeSeriesLeavesOption extends TreeSeriesStateOption, StatesOptionMixin<TreeSeriesStateOption, TreeStatesMixin> {
|
9812 | }
|
9813 | interface TreeSeriesOption extends SeriesOption<TreeSeriesStateOption, TreeStatesMixin>, TreeSeriesStateOption, SymbolOptionMixin<CallbackDataParams>, BoxLayoutOptionMixin, RoamOptionMixin {
|
9814 | type?: 'tree';
|
9815 | layout?: 'orthogonal' | 'radial';
|
9816 | edgeShape?: 'polyline' | 'curve';
|
9817 | |
9818 |
|
9819 |
|
9820 | edgeForkPosition?: string | number;
|
9821 | nodeScaleRatio?: number;
|
9822 | |
9823 |
|
9824 |
|
9825 |
|
9826 | orient?: 'LR' | 'TB' | 'RL' | 'BT' | 'horizontal' | 'vertical';
|
9827 | expandAndCollapse?: boolean;
|
9828 | |
9829 |
|
9830 |
|
9831 | initialTreeDepth?: number;
|
9832 | leaves?: TreeSeriesLeavesOption;
|
9833 | data?: TreeSeriesNodeItemOption[];
|
9834 | }
|
9835 |
|
9836 | declare type TreemapSeriesDataValue = number | number[];
|
9837 | interface BreadcrumbItemStyleOption extends ItemStyleOption {
|
9838 | textStyle?: LabelOption;
|
9839 | }
|
9840 | interface TreemapSeriesLabelOption extends SeriesLabelOption {
|
9841 | formatter?: string | ((params: CallbackDataParams) => string);
|
9842 | }
|
9843 | interface TreemapSeriesItemStyleOption<TCbParams = never> extends ItemStyleOption<TCbParams> {
|
9844 | borderRadius?: number | number[];
|
9845 | colorAlpha?: number;
|
9846 | colorSaturation?: number;
|
9847 | borderColorSaturation?: number;
|
9848 | gapWidth?: number;
|
9849 | }
|
9850 | interface TreePathInfo {
|
9851 | name: string;
|
9852 | dataIndex: number;
|
9853 | value: TreemapSeriesDataValue;
|
9854 | }
|
9855 | interface TreemapSeriesCallbackDataParams extends CallbackDataParams {
|
9856 | |
9857 |
|
9858 |
|
9859 | treePathInfo?: TreePathInfo[];
|
9860 | treeAncestors?: TreePathInfo[];
|
9861 | }
|
9862 | interface ExtraStateOption$1 {
|
9863 | emphasis?: {
|
9864 | focus?: DefaultEmphasisFocus | 'descendant' | 'ancestor';
|
9865 | };
|
9866 | }
|
9867 | interface TreemapStateOption<TCbParams = never> {
|
9868 | itemStyle?: TreemapSeriesItemStyleOption<TCbParams>;
|
9869 | label?: TreemapSeriesLabelOption;
|
9870 | upperLabel?: TreemapSeriesLabelOption;
|
9871 | }
|
9872 | interface TreemapSeriesVisualOption {
|
9873 | |
9874 |
|
9875 |
|
9876 | visualDimension?: number | string;
|
9877 | |
9878 |
|
9879 |
|
9880 | colorMappingBy?: 'value' | 'index' | 'id';
|
9881 | visualMin?: number;
|
9882 | visualMax?: number;
|
9883 | colorAlpha?: number[] | 'none';
|
9884 | colorSaturation?: number[] | 'none';
|
9885 | |
9886 |
|
9887 |
|
9888 | visibleMin?: number;
|
9889 | |
9890 |
|
9891 |
|
9892 | childrenVisibleMin?: number;
|
9893 | }
|
9894 | interface TreemapSeriesLevelOption extends TreemapSeriesVisualOption, TreemapStateOption, StatesOptionMixin<TreemapStateOption, ExtraStateOption$1> {
|
9895 | color?: ColorString[] | 'none';
|
9896 | decal?: DecalObject[] | 'none';
|
9897 | }
|
9898 | interface TreemapSeriesNodeItemOption extends TreemapSeriesVisualOption, TreemapStateOption, StatesOptionMixin<TreemapStateOption, ExtraStateOption$1> {
|
9899 | id?: OptionId;
|
9900 | name?: OptionName;
|
9901 | value?: TreemapSeriesDataValue;
|
9902 | children?: TreemapSeriesNodeItemOption[];
|
9903 | color?: ColorString[] | 'none';
|
9904 | decal?: DecalObject[] | 'none';
|
9905 | }
|
9906 | interface TreemapSeriesOption extends SeriesOption<TreemapStateOption<TreemapSeriesCallbackDataParams>, ExtraStateOption$1>, TreemapStateOption<TreemapSeriesCallbackDataParams>, BoxLayoutOptionMixin, RoamOptionMixin, TreemapSeriesVisualOption {
|
9907 | type?: 'treemap';
|
9908 | |
9909 |
|
9910 |
|
9911 |
|
9912 | size?: (number | string)[];
|
9913 | |
9914 |
|
9915 |
|
9916 |
|
9917 | sort?: boolean | 'asc' | 'desc';
|
9918 | |
9919 |
|
9920 |
|
9921 | clipWindow?: 'origin' | 'fullscreen';
|
9922 | squareRatio?: number;
|
9923 | |
9924 |
|
9925 |
|
9926 |
|
9927 | leafDepth?: number;
|
9928 | drillDownIcon?: string;
|
9929 | |
9930 |
|
9931 |
|
9932 |
|
9933 | zoomToNodeRatio?: number;
|
9934 | |
9935 |
|
9936 |
|
9937 |
|
9938 |
|
9939 |
|
9940 | nodeClick?: 'zoomToNode' | 'link' | false;
|
9941 | breadcrumb?: BoxLayoutOptionMixin & {
|
9942 | show?: boolean;
|
9943 | height?: number;
|
9944 | emptyItemWidth?: number;
|
9945 | itemStyle?: BreadcrumbItemStyleOption;
|
9946 | emphasis?: {
|
9947 | disabled?: boolean;
|
9948 | focus?: DefaultEmphasisFocus;
|
9949 | blurScope?: BlurScope;
|
9950 | itemStyle?: BreadcrumbItemStyleOption;
|
9951 | };
|
9952 | };
|
9953 | levels?: TreemapSeriesLevelOption[];
|
9954 | data?: TreemapSeriesNodeItemOption[];
|
9955 | }
|
9956 |
|
9957 | declare type GraphDataValue = OptionDataValue | OptionDataValue[];
|
9958 | interface GraphEdgeLineStyleOption extends LineStyleOption {
|
9959 | curveness?: number;
|
9960 | }
|
9961 | interface GraphNodeStateOption<TCbParams = never> {
|
9962 | itemStyle?: ItemStyleOption<TCbParams>;
|
9963 | label?: SeriesLabelOption;
|
9964 | }
|
9965 | interface ExtraEmphasisState {
|
9966 | focus?: DefaultEmphasisFocus | 'adjacency';
|
9967 | }
|
9968 | interface GraphNodeStatesMixin {
|
9969 | emphasis?: ExtraEmphasisState;
|
9970 | }
|
9971 | interface GraphEdgeStatesMixin {
|
9972 | emphasis?: ExtraEmphasisState;
|
9973 | }
|
9974 | interface GraphNodeItemOption extends SymbolOptionMixin, GraphNodeStateOption, StatesOptionMixin<GraphNodeStateOption, GraphNodeStatesMixin> {
|
9975 | id?: string;
|
9976 | name?: string;
|
9977 | value?: GraphDataValue;
|
9978 | |
9979 |
|
9980 |
|
9981 | x?: number;
|
9982 | |
9983 |
|
9984 |
|
9985 | y?: number;
|
9986 | |
9987 |
|
9988 |
|
9989 | fixed?: boolean;
|
9990 | |
9991 |
|
9992 |
|
9993 | category?: number | string;
|
9994 | draggable?: boolean;
|
9995 | cursor?: string;
|
9996 | }
|
9997 | interface GraphEdgeStateOption {
|
9998 | lineStyle?: GraphEdgeLineStyleOption;
|
9999 | label?: SeriesLineLabelOption;
|
10000 | }
|
10001 | interface GraphEdgeItemOption extends GraphEdgeStateOption, StatesOptionMixin<GraphEdgeStateOption, GraphEdgeStatesMixin>, GraphEdgeItemObject<OptionDataValueNumeric> {
|
10002 | value?: number;
|
10003 | |
10004 |
|
10005 |
|
10006 | symbol?: string | string[];
|
10007 | symbolSize?: number | number[];
|
10008 | ignoreForceLayout?: boolean;
|
10009 | }
|
10010 | interface GraphCategoryItemOption extends SymbolOptionMixin, GraphNodeStateOption, StatesOptionMixin<GraphNodeStateOption, GraphNodeStatesMixin> {
|
10011 | name?: string;
|
10012 | value?: OptionDataValue;
|
10013 | }
|
10014 | interface GraphSeriesOption extends SeriesOption<GraphNodeStateOption<CallbackDataParams>, GraphNodeStatesMixin>, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SymbolOptionMixin<CallbackDataParams>, RoamOptionMixin, BoxLayoutOptionMixin {
|
10015 | type?: 'graph';
|
10016 | coordinateSystem?: string;
|
10017 | legendHoverLink?: boolean;
|
10018 | layout?: 'none' | 'force' | 'circular';
|
10019 | data?: (GraphNodeItemOption | GraphDataValue)[];
|
10020 | nodes?: (GraphNodeItemOption | GraphDataValue)[];
|
10021 | edges?: GraphEdgeItemOption[];
|
10022 | links?: GraphEdgeItemOption[];
|
10023 | categories?: GraphCategoryItemOption[];
|
10024 | |
10025 |
|
10026 |
|
10027 | focusNodeAdjacency?: boolean;
|
10028 | |
10029 |
|
10030 |
|
10031 | nodeScaleRatio?: 0.6;
|
10032 | draggable?: boolean;
|
10033 | edgeSymbol?: string | string[];
|
10034 | edgeSymbolSize?: number | number[];
|
10035 | edgeLabel?: SeriesLineLabelOption;
|
10036 | label?: SeriesLabelOption;
|
10037 | itemStyle?: ItemStyleOption<CallbackDataParams>;
|
10038 | lineStyle?: GraphEdgeLineStyleOption;
|
10039 | emphasis?: {
|
10040 | focus?: Exclude<GraphNodeItemOption['emphasis'], undefined>['focus'];
|
10041 | scale?: boolean | number;
|
10042 | label?: SeriesLabelOption;
|
10043 | edgeLabel?: SeriesLabelOption;
|
10044 | itemStyle?: ItemStyleOption;
|
10045 | lineStyle?: LineStyleOption;
|
10046 | };
|
10047 | blur?: {
|
10048 | label?: SeriesLabelOption;
|
10049 | edgeLabel?: SeriesLabelOption;
|
10050 | itemStyle?: ItemStyleOption;
|
10051 | lineStyle?: LineStyleOption;
|
10052 | };
|
10053 | select?: {
|
10054 | label?: SeriesLabelOption;
|
10055 | edgeLabel?: SeriesLabelOption;
|
10056 | itemStyle?: ItemStyleOption;
|
10057 | lineStyle?: LineStyleOption;
|
10058 | };
|
10059 | circular?: {
|
10060 | rotateLabel?: boolean;
|
10061 | };
|
10062 | force?: {
|
10063 | initLayout?: 'circular' | 'none';
|
10064 | repulsion?: number | number[];
|
10065 | gravity?: number;
|
10066 | friction?: number;
|
10067 | edgeLength?: number | number[];
|
10068 | layoutAnimation?: boolean;
|
10069 | };
|
10070 | |
10071 |
|
10072 |
|
10073 | autoCurveness?: boolean | number | number[];
|
10074 | }
|
10075 |
|
10076 | declare type GaugeColorStop = [number, ColorString];
|
10077 | interface LabelFormatter$1 {
|
10078 | (value: number): string;
|
10079 | }
|
10080 | interface PointerOption {
|
10081 | icon?: string;
|
10082 | show?: boolean;
|
10083 | |
10084 |
|
10085 |
|
10086 | showAbove?: boolean;
|
10087 | keepAspect?: boolean;
|
10088 | itemStyle?: ItemStyleOption;
|
10089 | |
10090 |
|
10091 |
|
10092 | offsetCenter?: (number | string)[];
|
10093 | length?: number | string;
|
10094 | width?: number;
|
10095 | }
|
10096 | interface AnchorOption {
|
10097 | show?: boolean;
|
10098 | showAbove?: boolean;
|
10099 | size?: number;
|
10100 | icon?: string;
|
10101 | offsetCenter?: (number | string)[];
|
10102 | keepAspect?: boolean;
|
10103 | itemStyle?: ItemStyleOption;
|
10104 | }
|
10105 | interface ProgressOption {
|
10106 | show?: boolean;
|
10107 | overlap?: boolean;
|
10108 | width?: number;
|
10109 | roundCap?: boolean;
|
10110 | clip?: boolean;
|
10111 | itemStyle?: ItemStyleOption;
|
10112 | }
|
10113 | interface TitleOption$1 extends LabelOption {
|
10114 | |
10115 |
|
10116 |
|
10117 | offsetCenter?: (number | string)[];
|
10118 | formatter?: LabelFormatter$1 | string;
|
10119 | |
10120 |
|
10121 |
|
10122 | valueAnimation?: boolean;
|
10123 | }
|
10124 | interface DetailOption extends LabelOption {
|
10125 | |
10126 |
|
10127 |
|
10128 | offsetCenter?: (number | string)[];
|
10129 | formatter?: LabelFormatter$1 | string;
|
10130 | |
10131 |
|
10132 |
|
10133 | valueAnimation?: boolean;
|
10134 | }
|
10135 | interface GaugeStatesMixin {
|
10136 | emphasis?: DefaultStatesMixinEmphasis;
|
10137 | }
|
10138 | interface GaugeStateOption<TCbParams = never> {
|
10139 | itemStyle?: ItemStyleOption<TCbParams>;
|
10140 | }
|
10141 | interface GaugeDataItemOption extends GaugeStateOption, StatesOptionMixin<GaugeStateOption<CallbackDataParams>, GaugeStatesMixin> {
|
10142 | name?: string;
|
10143 | value?: OptionDataValueNumeric;
|
10144 | pointer?: PointerOption;
|
10145 | progress?: ProgressOption;
|
10146 | title?: TitleOption$1;
|
10147 | detail?: DetailOption;
|
10148 | }
|
10149 | interface GaugeSeriesOption extends SeriesOption<GaugeStateOption, GaugeStatesMixin>, GaugeStateOption<CallbackDataParams>, CircleLayoutOptionMixin, SeriesEncodeOptionMixin {
|
10150 | type?: 'gauge';
|
10151 | radius?: number | string;
|
10152 | startAngle?: number;
|
10153 | endAngle?: number;
|
10154 | clockwise?: boolean;
|
10155 | min?: number;
|
10156 | max?: number;
|
10157 | splitNumber?: number;
|
10158 | itemStyle?: ItemStyleOption;
|
10159 | axisLine?: {
|
10160 | show?: boolean;
|
10161 | roundCap?: boolean;
|
10162 | lineStyle?: Omit<LineStyleOption, 'color'> & {
|
10163 | color?: GaugeColorStop[];
|
10164 | };
|
10165 | };
|
10166 | progress?: ProgressOption;
|
10167 | splitLine?: {
|
10168 | show?: boolean;
|
10169 | |
10170 |
|
10171 |
|
10172 | length?: number;
|
10173 | distance?: number;
|
10174 | lineStyle?: LineStyleOption;
|
10175 | };
|
10176 | axisTick?: {
|
10177 | show?: boolean;
|
10178 | splitNumber?: number;
|
10179 | |
10180 |
|
10181 |
|
10182 | length?: number | string;
|
10183 | distance?: number;
|
10184 | lineStyle?: LineStyleOption;
|
10185 | };
|
10186 | axisLabel?: Omit<LabelOption, 'rotate'> & {
|
10187 | formatter?: LabelFormatter$1 | string;
|
10188 | rotate?: 'tangential' | 'radial' | number;
|
10189 | };
|
10190 | pointer?: PointerOption;
|
10191 | anchor?: AnchorOption;
|
10192 | title?: TitleOption$1;
|
10193 | detail?: DetailOption;
|
10194 | data?: (OptionDataValueNumeric | GaugeDataItemOption)[];
|
10195 | }
|
10196 |
|
10197 | declare type FunnelLabelOption = Omit<SeriesLabelOption, 'position'> & {
|
10198 | position?: LabelOption['position'] | 'outer' | 'inner' | 'center' | 'rightTop' | 'rightBottom' | 'leftTop' | 'leftBottom';
|
10199 | };
|
10200 | interface FunnelStatesMixin {
|
10201 | emphasis?: DefaultStatesMixinEmphasis;
|
10202 | }
|
10203 | interface FunnelCallbackDataParams extends CallbackDataParams {
|
10204 | percent: number;
|
10205 | }
|
10206 | interface FunnelStateOption<TCbParams = never> {
|
10207 | itemStyle?: ItemStyleOption<TCbParams>;
|
10208 | label?: FunnelLabelOption;
|
10209 | labelLine?: LabelLineOption;
|
10210 | }
|
10211 | interface FunnelDataItemOption extends FunnelStateOption, StatesOptionMixin<FunnelStateOption, FunnelStatesMixin>, OptionDataItemObject<OptionDataValueNumeric> {
|
10212 | itemStyle?: ItemStyleOption & {
|
10213 | width?: number | string;
|
10214 | height?: number | string;
|
10215 | };
|
10216 | }
|
10217 | interface FunnelSeriesOption extends SeriesOption<FunnelStateOption<FunnelCallbackDataParams>, FunnelStatesMixin>, FunnelStateOption<FunnelCallbackDataParams>, BoxLayoutOptionMixin, SeriesEncodeOptionMixin {
|
10218 | type?: 'funnel';
|
10219 | min?: number;
|
10220 | max?: number;
|
10221 | |
10222 |
|
10223 |
|
10224 | minSize?: number | string;
|
10225 | maxSize?: number | string;
|
10226 | sort?: 'ascending' | 'descending' | 'none';
|
10227 | orient?: LayoutOrient;
|
10228 | gap?: number;
|
10229 | funnelAlign?: HorizontalAlign | VerticalAlign;
|
10230 | data?: (OptionDataValueNumeric | OptionDataValueNumeric[] | FunnelDataItemOption)[];
|
10231 | }
|
10232 |
|
10233 | declare type ParallelSeriesDataValue = OptionDataValue[];
|
10234 | interface ParallelStatesMixin {
|
10235 | emphasis?: DefaultStatesMixinEmphasis;
|
10236 | }
|
10237 | interface ParallelStateOption<TCbParams = never> {
|
10238 | lineStyle?: LineStyleOption<(TCbParams extends never ? never : (params: TCbParams) => ZRColor) | ZRColor>;
|
10239 | label?: SeriesLabelOption;
|
10240 | }
|
10241 | interface ParallelSeriesDataItemOption extends ParallelStateOption, StatesOptionMixin<ParallelStateOption, ParallelStatesMixin> {
|
10242 | value?: ParallelSeriesDataValue;
|
10243 | }
|
10244 | interface ParallelSeriesOption extends SeriesOption<ParallelStateOption<CallbackDataParams>, ParallelStatesMixin>, ParallelStateOption<CallbackDataParams>, SeriesEncodeOptionMixin {
|
10245 | type?: 'parallel';
|
10246 | coordinateSystem?: string;
|
10247 | parallelIndex?: number;
|
10248 | parallelId?: string;
|
10249 | inactiveOpacity?: number;
|
10250 | activeOpacity?: number;
|
10251 | smooth?: boolean | number;
|
10252 | realtime?: boolean;
|
10253 | tooltip?: SeriesTooltipOption;
|
10254 | parallelAxisDefault?: ParallelAxisOption;
|
10255 | data?: (ParallelSeriesDataValue | ParallelSeriesDataItemOption)[];
|
10256 | }
|
10257 |
|
10258 | declare type FocusNodeAdjacency = boolean | 'inEdges' | 'outEdges' | 'allEdges';
|
10259 | interface SankeyNodeStateOption<TCbParams = never> {
|
10260 | label?: SeriesLabelOption;
|
10261 | itemStyle?: ItemStyleOption<TCbParams>;
|
10262 | }
|
10263 | interface SankeyEdgeStateOption {
|
10264 | lineStyle?: SankeyEdgeStyleOption;
|
10265 | }
|
10266 | interface SankeyBothStateOption<TCbParams> extends SankeyNodeStateOption<TCbParams>, SankeyEdgeStateOption {
|
10267 | }
|
10268 | interface SankeyEdgeStyleOption extends LineStyleOption {
|
10269 | curveness?: number;
|
10270 | }
|
10271 | interface ExtraStateOption$2 {
|
10272 | emphasis?: {
|
10273 | focus?: DefaultEmphasisFocus | 'adjacency' | 'trajectory';
|
10274 | };
|
10275 | }
|
10276 | interface SankeyNodeItemOption extends SankeyNodeStateOption, StatesOptionMixin<SankeyNodeStateOption, ExtraStateOption$2>, OptionDataItemObject<OptionDataValue> {
|
10277 | id?: string;
|
10278 | localX?: number;
|
10279 | localY?: number;
|
10280 | depth?: number;
|
10281 | draggable?: boolean;
|
10282 | focusNodeAdjacency?: FocusNodeAdjacency;
|
10283 | }
|
10284 | interface SankeyEdgeItemOption extends SankeyEdgeStateOption, StatesOptionMixin<SankeyEdgeStateOption, ExtraStateOption$2>, GraphEdgeItemObject<OptionDataValueNumeric> {
|
10285 | focusNodeAdjacency?: FocusNodeAdjacency;
|
10286 | edgeLabel?: SeriesLabelOption;
|
10287 | }
|
10288 | interface SankeyLevelOption extends SankeyNodeStateOption, SankeyEdgeStateOption {
|
10289 | depth: number;
|
10290 | }
|
10291 | interface SankeySeriesOption extends SeriesOption<SankeyBothStateOption<CallbackDataParams>, ExtraStateOption$2>, SankeyBothStateOption<CallbackDataParams>, BoxLayoutOptionMixin {
|
10292 | type?: 'sankey';
|
10293 | |
10294 |
|
10295 |
|
10296 | color?: ColorString[];
|
10297 | coordinateSystem?: 'view';
|
10298 | orient?: LayoutOrient;
|
10299 | |
10300 |
|
10301 |
|
10302 | nodeWidth?: number;
|
10303 | |
10304 |
|
10305 |
|
10306 | nodeGap?: number;
|
10307 | |
10308 |
|
10309 |
|
10310 | draggable?: boolean;
|
10311 | |
10312 |
|
10313 |
|
10314 |
|
10315 | focusNodeAdjacency?: FocusNodeAdjacency;
|
10316 | |
10317 |
|
10318 |
|
10319 | layoutIterations?: number;
|
10320 | nodeAlign?: 'justify' | 'left' | 'right';
|
10321 | data?: SankeyNodeItemOption[];
|
10322 | nodes?: SankeyNodeItemOption[];
|
10323 | edges?: SankeyEdgeItemOption[];
|
10324 | links?: SankeyEdgeItemOption[];
|
10325 | levels?: SankeyLevelOption[];
|
10326 | edgeLabel?: SeriesLabelOption & {
|
10327 | position?: 'inside';
|
10328 | };
|
10329 | }
|
10330 |
|
10331 | declare type BoxplotDataValue = OptionDataValueNumeric[];
|
10332 | interface BoxplotStateOption<TCbParams = never> {
|
10333 | itemStyle?: ItemStyleOption<TCbParams>;
|
10334 | label?: SeriesLabelOption;
|
10335 | }
|
10336 | interface BoxplotDataItemOption extends BoxplotStateOption, StatesOptionMixin<BoxplotStateOption, ExtraStateOption$3> {
|
10337 | value: BoxplotDataValue;
|
10338 | }
|
10339 | interface ExtraStateOption$3 {
|
10340 | emphasis?: {
|
10341 | focus?: DefaultEmphasisFocus;
|
10342 | scale?: boolean;
|
10343 | };
|
10344 | }
|
10345 | interface BoxplotSeriesOption extends SeriesOption<BoxplotStateOption<CallbackDataParams>, ExtraStateOption$3>, BoxplotStateOption<CallbackDataParams>, SeriesOnCartesianOptionMixin, SeriesEncodeOptionMixin {
|
10346 | type?: 'boxplot';
|
10347 | coordinateSystem?: 'cartesian2d';
|
10348 | layout?: LayoutOrient;
|
10349 | |
10350 |
|
10351 |
|
10352 | boxWidth?: (string | number)[];
|
10353 | data?: (BoxplotDataValue | BoxplotDataItemOption)[];
|
10354 | }
|
10355 |
|
10356 | declare type CandlestickDataValue = OptionDataValue[];
|
10357 | interface CandlestickItemStyleOption extends ItemStyleOption {
|
10358 | color0?: ZRColor;
|
10359 | borderColor0?: ColorString;
|
10360 | borderColorDoji?: ZRColor;
|
10361 | }
|
10362 | interface CandlestickStateOption {
|
10363 | itemStyle?: CandlestickItemStyleOption;
|
10364 | label?: SeriesLabelOption;
|
10365 | }
|
10366 | interface CandlestickDataItemOption extends CandlestickStateOption, StatesOptionMixin<CandlestickStateOption, ExtraStateOption$4> {
|
10367 | value: CandlestickDataValue;
|
10368 | }
|
10369 | interface ExtraStateOption$4 {
|
10370 | emphasis?: {
|
10371 | focus?: DefaultEmphasisFocus;
|
10372 | scale?: boolean;
|
10373 | };
|
10374 | }
|
10375 | interface CandlestickSeriesOption extends SeriesOption<CandlestickStateOption, ExtraStateOption$4>, CandlestickStateOption, SeriesOnCartesianOptionMixin, SeriesLargeOptionMixin, SeriesEncodeOptionMixin {
|
10376 | type?: 'candlestick';
|
10377 | coordinateSystem?: 'cartesian2d';
|
10378 | layout?: LayoutOrient;
|
10379 | clip?: boolean;
|
10380 | barMaxWidth?: number | string;
|
10381 | barMinWidth?: number | string;
|
10382 | barWidth?: number | string;
|
10383 | data?: (CandlestickDataValue | CandlestickDataItemOption)[];
|
10384 | }
|
10385 |
|
10386 | interface RippleEffectOption {
|
10387 | period?: number;
|
10388 | |
10389 |
|
10390 |
|
10391 | scale?: number;
|
10392 | brushType?: 'fill' | 'stroke';
|
10393 | color?: ZRColor;
|
10394 | |
10395 |
|
10396 |
|
10397 | number?: number;
|
10398 | }
|
10399 | interface SymbolDrawStateOption {
|
10400 | itemStyle?: ItemStyleOption;
|
10401 | label?: LabelOption;
|
10402 | }
|
10403 | interface SymbolDrawItemModelOption extends SymbolOptionMixin<object>, StatesOptionMixin<SymbolDrawStateOption, {
|
10404 | emphasis?: {
|
10405 | focus?: DefaultEmphasisFocus;
|
10406 | scale?: boolean | number;
|
10407 | };
|
10408 | }>, SymbolDrawStateOption {
|
10409 | cursor?: string;
|
10410 | rippleEffect?: RippleEffectOption;
|
10411 | }
|
10412 |
|
10413 | declare type ScatterDataValue = OptionDataValue | OptionDataValue[];
|
10414 | interface EffectScatterStatesOptionMixin {
|
10415 | emphasis?: {
|
10416 | focus?: DefaultEmphasisFocus;
|
10417 | scale?: boolean | number;
|
10418 | };
|
10419 | }
|
10420 | interface EffectScatterStateOption<TCbParams = never> {
|
10421 | itemStyle?: ItemStyleOption<TCbParams>;
|
10422 | label?: SeriesLabelOption;
|
10423 | }
|
10424 | interface EffectScatterDataItemOption extends SymbolOptionMixin, EffectScatterStateOption, StatesOptionMixin<EffectScatterStateOption, EffectScatterStatesOptionMixin> {
|
10425 | name?: string;
|
10426 | value?: ScatterDataValue;
|
10427 | rippleEffect?: SymbolDrawItemModelOption['rippleEffect'];
|
10428 | }
|
10429 | interface EffectScatterSeriesOption extends SeriesOption<EffectScatterStateOption<CallbackDataParams>, EffectScatterStatesOptionMixin>, EffectScatterStateOption<CallbackDataParams>, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesOnGeoOptionMixin, SeriesOnSingleOptionMixin, SymbolOptionMixin<CallbackDataParams>, SeriesEncodeOptionMixin {
|
10430 | type?: 'effectScatter';
|
10431 | coordinateSystem?: string;
|
10432 | effectType?: 'ripple';
|
10433 | |
10434 |
|
10435 |
|
10436 | showEffectOn?: 'render' | 'emphasis';
|
10437 | clip?: boolean;
|
10438 | |
10439 |
|
10440 |
|
10441 | rippleEffect?: SymbolDrawItemModelOption['rippleEffect'];
|
10442 | data?: (EffectScatterDataItemOption | ScatterDataValue)[];
|
10443 | }
|
10444 |
|
10445 | interface LineDrawStateOption {
|
10446 | lineStyle?: LineStyleOption;
|
10447 | label?: LineLabelOption;
|
10448 | }
|
10449 | interface LineDrawModelOption extends LineDrawStateOption, StatesOptionMixin<LineDrawStateOption, {
|
10450 | emphasis?: {
|
10451 | focus?: DefaultEmphasisFocus;
|
10452 | };
|
10453 | }> {
|
10454 | effect?: {
|
10455 | show?: boolean;
|
10456 | period?: number;
|
10457 | delay?: number | ((idx: number) => number);
|
10458 | |
10459 |
|
10460 |
|
10461 |
|
10462 | constantSpeed?: number;
|
10463 | symbol?: string;
|
10464 | symbolSize?: number | number[];
|
10465 | loop?: boolean;
|
10466 | roundTrip?: boolean;
|
10467 | |
10468 |
|
10469 |
|
10470 | trailLength?: number;
|
10471 | |
10472 |
|
10473 |
|
10474 | color?: ColorString;
|
10475 | };
|
10476 | }
|
10477 |
|
10478 | declare type LinesCoords = number[][];
|
10479 | declare type LinesValue = OptionDataValue | OptionDataValue[];
|
10480 | interface LinesLineStyleOption<TClr> extends LineStyleOption<TClr> {
|
10481 | curveness?: number;
|
10482 | }
|
10483 | interface LinesStatesMixin {
|
10484 | emphasis?: DefaultStatesMixinEmphasis;
|
10485 | }
|
10486 | interface LinesStateOption<TCbParams = never> {
|
10487 | lineStyle?: LinesLineStyleOption<(TCbParams extends never ? never : (params: TCbParams) => ZRColor) | ZRColor>;
|
10488 | label?: SeriesLineLabelOption;
|
10489 | }
|
10490 | interface LinesDataItemOption extends LinesStateOption, StatesOptionMixin<LinesStateOption, LinesStatesMixin> {
|
10491 | name?: string;
|
10492 | fromName?: string;
|
10493 | toName?: string;
|
10494 | symbol?: string[] | string;
|
10495 | symbolSize?: number[] | number;
|
10496 | coords?: LinesCoords;
|
10497 | value?: LinesValue;
|
10498 | effect?: LineDrawModelOption['effect'];
|
10499 | }
|
10500 | interface LinesSeriesOption extends SeriesOption<LinesStateOption, LinesStatesMixin>, LinesStateOption<CallbackDataParams>, SeriesOnCartesianOptionMixin, SeriesOnGeoOptionMixin, SeriesOnPolarOptionMixin, SeriesOnCalendarOptionMixin, SeriesLargeOptionMixin {
|
10501 | type?: 'lines';
|
10502 | coordinateSystem?: string;
|
10503 | symbol?: string[] | string;
|
10504 | symbolSize?: number[] | number;
|
10505 | effect?: LineDrawModelOption['effect'];
|
10506 | |
10507 |
|
10508 |
|
10509 |
|
10510 | polyline?: boolean;
|
10511 | |
10512 |
|
10513 |
|
10514 |
|
10515 | clip?: boolean;
|
10516 | data?: LinesDataItemOption[] | ArrayLike<number>;
|
10517 | dimensions?: DimensionDefinitionLoose | DimensionDefinitionLoose[];
|
10518 | }
|
10519 |
|
10520 | declare type HeatmapDataValue = OptionDataValue[];
|
10521 | interface HeatmapStateOption<TCbParams = never> {
|
10522 | itemStyle?: ItemStyleOption<TCbParams> & {
|
10523 | borderRadius?: number | number[];
|
10524 | };
|
10525 | label?: SeriesLabelOption;
|
10526 | }
|
10527 | interface FunnelStatesMixin$1 {
|
10528 | emphasis?: DefaultStatesMixinEmphasis;
|
10529 | }
|
10530 | interface HeatmapDataItemOption extends HeatmapStateOption, StatesOptionMixin<HeatmapStateOption, FunnelStatesMixin$1> {
|
10531 | value: HeatmapDataValue;
|
10532 | }
|
10533 | interface HeatmapSeriesOption extends SeriesOption<HeatmapStateOption<CallbackDataParams>, FunnelStatesMixin$1>, HeatmapStateOption<CallbackDataParams>, SeriesOnCartesianOptionMixin, SeriesOnGeoOptionMixin, SeriesOnCalendarOptionMixin, SeriesEncodeOptionMixin {
|
10534 | type?: 'heatmap';
|
10535 | coordinateSystem?: 'cartesian2d' | 'geo' | 'calendar';
|
10536 | blurSize?: number;
|
10537 | pointSize?: number;
|
10538 | maxOpacity?: number;
|
10539 | minOpacity?: number;
|
10540 | data?: (HeatmapDataItemOption | HeatmapDataValue)[];
|
10541 | }
|
10542 |
|
10543 | interface PictorialBarStateOption {
|
10544 | itemStyle?: ItemStyleOption;
|
10545 | label?: SeriesLabelOption;
|
10546 | }
|
10547 | interface PictorialBarSeriesSymbolOption {
|
10548 | |
10549 |
|
10550 |
|
10551 | symbol?: string;
|
10552 | |
10553 |
|
10554 |
|
10555 |
|
10556 |
|
10557 | symbolSize?: (number | string)[] | number | string;
|
10558 | symbolRotate?: number;
|
10559 | |
10560 |
|
10561 |
|
10562 | symbolPosition?: 'start' | 'end' | 'center';
|
10563 | |
10564 |
|
10565 |
|
10566 | symbolOffset?: (number | string)[] | number | string;
|
10567 | |
10568 |
|
10569 |
|
10570 |
|
10571 | symbolMargin?: (number | string)[] | number | string;
|
10572 | |
10573 |
|
10574 |
|
10575 |
|
10576 |
|
10577 |
|
10578 |
|
10579 | symbolRepeat?: boolean | number | 'fixed';
|
10580 | |
10581 |
|
10582 |
|
10583 | symbolRepeatDirection?: 'start' | 'end';
|
10584 | symbolClip?: boolean;
|
10585 | |
10586 |
|
10587 |
|
10588 | symbolBoundingData?: number | number[];
|
10589 | symbolPatternSize?: number;
|
10590 | }
|
10591 | interface ExtraStateOption$5 {
|
10592 | emphasis?: {
|
10593 | focus?: DefaultEmphasisFocus;
|
10594 | scale?: boolean;
|
10595 | };
|
10596 | }
|
10597 | interface PictorialBarDataItemOption extends PictorialBarSeriesSymbolOption, AnimationOptionMixin, PictorialBarStateOption, StatesOptionMixin<PictorialBarStateOption, ExtraStateOption$5>, OptionDataItemObject<OptionDataValue> {
|
10598 | z?: number;
|
10599 | cursor?: string;
|
10600 | }
|
10601 | interface PictorialBarSeriesOption extends BaseBarSeriesOption<PictorialBarStateOption, ExtraStateOption$5>, PictorialBarStateOption, PictorialBarSeriesSymbolOption, SeriesStackOptionMixin, SeriesEncodeOptionMixin {
|
10602 | type?: 'pictorialBar';
|
10603 | coordinateSystem?: 'cartesian2d';
|
10604 | data?: (PictorialBarDataItemOption | OptionDataValue | OptionDataValue[])[];
|
10605 | clip?: boolean;
|
10606 | }
|
10607 |
|
10608 | interface ThemeRiverSeriesLabelOption extends SeriesLabelOption {
|
10609 | margin?: number;
|
10610 | }
|
10611 | declare type ThemerRiverDataItem = [OptionDataValueDate, OptionDataValueNumeric, string];
|
10612 | interface ThemeRiverStatesMixin {
|
10613 | emphasis?: DefaultStatesMixinEmphasis;
|
10614 | }
|
10615 | interface ThemeRiverStateOption<TCbParams = never> {
|
10616 | label?: ThemeRiverSeriesLabelOption;
|
10617 | itemStyle?: ItemStyleOption<TCbParams>;
|
10618 | }
|
10619 | interface ThemeRiverSeriesOption extends SeriesOption<ThemeRiverStateOption<CallbackDataParams>, ThemeRiverStatesMixin>, ThemeRiverStateOption<CallbackDataParams>, SeriesOnSingleOptionMixin, BoxLayoutOptionMixin {
|
10620 | type?: 'themeRiver';
|
10621 | color?: ZRColor[];
|
10622 | coordinateSystem?: 'singleAxis';
|
10623 | |
10624 |
|
10625 |
|
10626 | boundaryGap?: (string | number)[];
|
10627 | |
10628 |
|
10629 |
|
10630 | data?: ThemerRiverDataItem[];
|
10631 | }
|
10632 |
|
10633 | interface SunburstItemStyleOption<TCbParams = never> extends ItemStyleOption<TCbParams> {
|
10634 | borderRadius?: (number | string)[] | number | string;
|
10635 | }
|
10636 | interface SunburstLabelOption extends Omit<SeriesLabelOption<SunburstDataParams>, 'rotate' | 'position'> {
|
10637 | rotate?: 'radial' | 'tangential' | number;
|
10638 | minAngle?: number;
|
10639 | silent?: boolean;
|
10640 | position?: SeriesLabelOption['position'] | 'outside';
|
10641 | }
|
10642 | interface SunburstDataParams extends CallbackDataParams {
|
10643 | treePathInfo: {
|
10644 | name: string;
|
10645 | dataIndex: number;
|
10646 | value: SunburstSeriesNodeItemOption['value'];
|
10647 | }[];
|
10648 | }
|
10649 | interface SunburstStatesMixin {
|
10650 | emphasis?: {
|
10651 | focus?: DefaultEmphasisFocus | 'descendant' | 'ancestor';
|
10652 | };
|
10653 | }
|
10654 | interface SunburstStateOption<TCbParams = never> {
|
10655 | itemStyle?: SunburstItemStyleOption<TCbParams>;
|
10656 | label?: SunburstLabelOption;
|
10657 | }
|
10658 | interface SunburstSeriesNodeItemOption extends SunburstStateOption<SunburstDataParams>, StatesOptionMixin<SunburstStateOption<SunburstDataParams>, SunburstStatesMixin>, OptionDataItemObject<OptionDataValue> {
|
10659 | nodeClick?: 'rootToNode' | 'link' | false;
|
10660 | link?: string;
|
10661 | target?: string;
|
10662 | children?: SunburstSeriesNodeItemOption[];
|
10663 | collapsed?: boolean;
|
10664 | cursor?: string;
|
10665 | }
|
10666 | interface SunburstSeriesLevelOption extends SunburstStateOption<SunburstDataParams>, StatesOptionMixin<SunburstStateOption<SunburstDataParams>, SunburstStatesMixin> {
|
10667 | radius?: (number | string)[];
|
10668 | |
10669 |
|
10670 |
|
10671 | r?: number | string;
|
10672 | |
10673 |
|
10674 |
|
10675 | r0?: number | string;
|
10676 | highlight?: {
|
10677 | itemStyle?: SunburstItemStyleOption;
|
10678 | label?: SunburstLabelOption;
|
10679 | };
|
10680 | }
|
10681 | interface SortParam {
|
10682 | dataIndex: number;
|
10683 | depth: number;
|
10684 | height: number;
|
10685 | getValue(): number;
|
10686 | }
|
10687 | interface SunburstSeriesOption extends SeriesOption<SunburstStateOption<SunburstDataParams>, SunburstStatesMixin>, SunburstStateOption<SunburstDataParams>, SunburstColorByMixin, CircleLayoutOptionMixin {
|
10688 | type?: 'sunburst';
|
10689 | clockwise?: boolean;
|
10690 | startAngle?: number;
|
10691 | minAngle?: number;
|
10692 | |
10693 |
|
10694 |
|
10695 | stillShowZeroSum?: boolean;
|
10696 | |
10697 |
|
10698 |
|
10699 |
|
10700 |
|
10701 | nodeClick?: 'rootToNode' | 'link' | false;
|
10702 | renderLabelForZeroData?: boolean;
|
10703 | data?: SunburstSeriesNodeItemOption[];
|
10704 | levels?: SunburstSeriesLevelOption[];
|
10705 | animationType?: 'expansion' | 'scale';
|
10706 | sort?: 'desc' | 'asc' | ((a: SortParam, b: SortParam) => number);
|
10707 | }
|
10708 |
|
10709 | interface GraphicComponentBaseElementOption extends Partial<Pick<Element, TransformProp | 'silent' | 'ignore' | 'textConfig' | 'draggable' | ElementEventNameWithOn>>,
|
10710 |
|
10711 |
|
10712 |
|
10713 |
|
10714 |
|
10715 |
|
10716 |
|
10717 | Partial<Pick<BoxLayoutOptionMixin, 'left' | 'right' | 'top' | 'bottom'>> {
|
10718 | |
10719 |
|
10720 |
|
10721 |
|
10722 | type?: string;
|
10723 | id?: OptionId;
|
10724 | name?: string;
|
10725 | parentId?: OptionId;
|
10726 | parentOption?: GraphicComponentElementOption;
|
10727 | children?: GraphicComponentElementOption[];
|
10728 | hv?: [boolean, boolean];
|
10729 | |
10730 |
|
10731 |
|
10732 |
|
10733 |
|
10734 |
|
10735 |
|
10736 |
|
10737 |
|
10738 |
|
10739 |
|
10740 |
|
10741 | bounding?: 'raw' | 'all';
|
10742 | |
10743 |
|
10744 |
|
10745 |
|
10746 | info?: GraphicExtraElementInfo;
|
10747 | clipPath?: Omit<GraphicComponentZRPathOption, 'clipPath'> | false;
|
10748 | textContent?: Omit<GraphicComponentTextOption, 'clipPath'>;
|
10749 | textConfig?: ElementTextConfig;
|
10750 | $action?: 'merge' | 'replace' | 'remove';
|
10751 | tooltip?: CommonTooltipOption<unknown>;
|
10752 | enterAnimation?: AnimationOption$1;
|
10753 | updateAnimation?: AnimationOption$1;
|
10754 | leaveAnimation?: AnimationOption$1;
|
10755 | }
|
10756 | interface GraphicComponentDisplayableOption extends GraphicComponentBaseElementOption, Partial<Pick<Displayable, 'zlevel' | 'z' | 'z2' | 'invisible' | 'cursor'>> {
|
10757 | style?: ZRStyleProps;
|
10758 | z2?: number;
|
10759 | }
|
10760 | interface GraphicComponentGroupOption extends GraphicComponentBaseElementOption, TransitionOptionMixin<GroupProps> {
|
10761 | type?: 'group';
|
10762 | |
10763 |
|
10764 |
|
10765 |
|
10766 |
|
10767 |
|
10768 | width?: number;
|
10769 | height?: number;
|
10770 | children: GraphicComponentElementOption[];
|
10771 | keyframeAnimation?: ElementKeyframeAnimationOption<GroupProps> | ElementKeyframeAnimationOption<GroupProps>[];
|
10772 | }
|
10773 | interface GraphicComponentZRPathOption extends GraphicComponentDisplayableOption, TransitionOptionMixin<PathProps> {
|
10774 | shape?: PathProps['shape'] & TransitionOptionMixin<PathProps['shape']>;
|
10775 | style?: PathStyleProps & TransitionOptionMixin<PathStyleProps>;
|
10776 | keyframeAnimation?: ElementKeyframeAnimationOption<PathProps> | ElementKeyframeAnimationOption<PathProps>[];
|
10777 | }
|
10778 | interface GraphicComponentImageOption extends GraphicComponentDisplayableOption, TransitionOptionMixin<ImageProps> {
|
10779 | type?: 'image';
|
10780 | style?: ImageStyleProps & TransitionOptionMixin<ImageStyleProps>;
|
10781 | keyframeAnimation?: ElementKeyframeAnimationOption<ImageProps> | ElementKeyframeAnimationOption<ImageProps>[];
|
10782 | }
|
10783 | interface GraphicComponentTextOption extends Omit<GraphicComponentDisplayableOption, 'textContent' | 'textConfig'>, TransitionOptionMixin<TextProps> {
|
10784 | type?: 'text';
|
10785 | style?: TextStyleProps & TransitionOptionMixin<TextStyleProps>;
|
10786 | keyframeAnimation?: ElementKeyframeAnimationOption<TextProps> | ElementKeyframeAnimationOption<TextProps>[];
|
10787 | }
|
10788 | declare type GraphicComponentElementOption = GraphicComponentGroupOption | GraphicComponentZRPathOption | GraphicComponentImageOption | GraphicComponentTextOption;
|
10789 | declare type GraphicExtraElementInfo = Dictionary<unknown>;
|
10790 | declare type GraphicComponentLooseOption = (GraphicComponentOption | GraphicComponentElementOption) & {
|
10791 | mainType?: 'graphic';
|
10792 | };
|
10793 | interface GraphicComponentOption extends ComponentOption, AnimationOptionMixin {
|
10794 | elements?: GraphicComponentElementOption[];
|
10795 | }
|
10796 |
|
10797 | declare const ICON_TYPES: readonly ["rect", "polygon", "lineX", "lineY", "keep", "clear"];
|
10798 | declare type IconType = typeof ICON_TYPES[number];
|
10799 | interface ToolboxBrushFeatureOption extends ToolboxFeatureOption {
|
10800 | type?: IconType[];
|
10801 | icon?: {
|
10802 | [key in IconType]?: string;
|
10803 | };
|
10804 | title?: {
|
10805 | [key in IconType]?: string;
|
10806 | };
|
10807 | }
|
10808 |
|
10809 | interface ToolboxDataViewFeatureOption extends ToolboxFeatureOption {
|
10810 | readOnly?: boolean;
|
10811 | optionToContent?: (option: ECUnitOption) => string | HTMLElement;
|
10812 | contentToOption?: (viewMain: HTMLDivElement, oldOption: ECUnitOption) => ECUnitOption;
|
10813 | icon?: string;
|
10814 | title?: string;
|
10815 | lang?: string[];
|
10816 | backgroundColor?: ColorString;
|
10817 | textColor?: ColorString;
|
10818 | textareaColor?: ColorString;
|
10819 | textareaBorderColor?: ColorString;
|
10820 | buttonColor?: ColorString;
|
10821 | buttonTextColor?: ColorString;
|
10822 | }
|
10823 |
|
10824 | declare const ICON_TYPES$1: readonly ["zoom", "back"];
|
10825 | declare type IconType$1 = typeof ICON_TYPES$1[number];
|
10826 | interface ToolboxDataZoomFeatureOption extends ToolboxFeatureOption {
|
10827 | type?: IconType$1[];
|
10828 | icon?: {
|
10829 | [key in IconType$1]?: string;
|
10830 | };
|
10831 | title?: {
|
10832 | [key in IconType$1]?: string;
|
10833 | };
|
10834 | filterMode?: 'filter' | 'weakFilter' | 'empty' | 'none';
|
10835 | xAxisIndex?: ModelFinderIndexQuery;
|
10836 | yAxisIndex?: ModelFinderIndexQuery;
|
10837 | xAxisId?: ModelFinderIdQuery;
|
10838 | yAxisId?: ModelFinderIdQuery;
|
10839 | brushStyle?: ItemStyleOption;
|
10840 | }
|
10841 |
|
10842 | declare const ICON_TYPES$2: readonly ["line", "bar", "stack"];
|
10843 | declare const TITLE_TYPES: readonly ["line", "bar", "stack", "tiled"];
|
10844 | declare type IconType$2 = typeof ICON_TYPES$2[number];
|
10845 | declare type TitleType = typeof TITLE_TYPES[number];
|
10846 | interface ToolboxMagicTypeFeatureOption extends ToolboxFeatureOption {
|
10847 | type?: IconType$2[];
|
10848 | |
10849 |
|
10850 |
|
10851 | icon?: {
|
10852 | [key in IconType$2]?: string;
|
10853 | };
|
10854 | title?: {
|
10855 | [key in TitleType]?: string;
|
10856 | };
|
10857 | option?: {
|
10858 | [key in IconType$2]?: SeriesOption;
|
10859 | };
|
10860 | |
10861 |
|
10862 |
|
10863 | seriesIndex?: {
|
10864 | line?: number;
|
10865 | bar?: number;
|
10866 | };
|
10867 | }
|
10868 |
|
10869 | interface ToolboxRestoreFeatureOption extends ToolboxFeatureOption {
|
10870 | icon?: string;
|
10871 | title?: string;
|
10872 | }
|
10873 |
|
10874 | interface ToolboxSaveAsImageFeatureOption extends ToolboxFeatureOption {
|
10875 | icon?: string;
|
10876 | title?: string;
|
10877 | type?: 'png' | 'jpeg';
|
10878 | backgroundColor?: ZRColor;
|
10879 | connectedBackgroundColor?: ZRColor;
|
10880 | name?: string;
|
10881 | excludeComponents?: string[];
|
10882 | pixelRatio?: number;
|
10883 | lang?: string[];
|
10884 | }
|
10885 |
|
10886 | interface ToolboxComponentOption extends ToolboxOption {
|
10887 | feature?: {
|
10888 | brush?: ToolboxBrushFeatureOption;
|
10889 | dataView?: ToolboxDataViewFeatureOption;
|
10890 | dataZoom?: ToolboxDataZoomFeatureOption;
|
10891 | magicType?: ToolboxMagicTypeFeatureOption;
|
10892 | restore?: ToolboxRestoreFeatureOption;
|
10893 | saveAsImage?: ToolboxSaveAsImageFeatureOption;
|
10894 | [key: string]: ToolboxFeatureOption | {
|
10895 | [key: string]: any;
|
10896 | } | undefined;
|
10897 | };
|
10898 | }
|
10899 |
|
10900 | declare type DataZoomComponentOption = SliderDataZoomOption | InsideDataZoomOption;
|
10901 |
|
10902 | declare type VisualMapComponentOption = ContinousVisualMapOption | PiecewiseVisualMapOption;
|
10903 |
|
10904 | declare type LegendComponentOption = LegendOption | ScrollableLegendOption;
|
10905 |
|
10906 | declare type SeriesInjectedOption = {
|
10907 | markArea?: MarkAreaOption;
|
10908 | markLine?: MarkLineOption;
|
10909 | markPoint?: MarkPointOption;
|
10910 | tooltip?: SeriesTooltipOption;
|
10911 | };
|
10912 | declare type LineSeriesOption$1 = LineSeriesOption & SeriesInjectedOption;
|
10913 | declare type BarSeriesOption$1 = BarSeriesOption & SeriesInjectedOption;
|
10914 | declare type ScatterSeriesOption$1 = ScatterSeriesOption & SeriesInjectedOption;
|
10915 | declare type PieSeriesOption$1 = PieSeriesOption & SeriesInjectedOption;
|
10916 | declare type RadarSeriesOption$1 = RadarSeriesOption & SeriesInjectedOption;
|
10917 | declare type MapSeriesOption$1 = MapSeriesOption & SeriesInjectedOption;
|
10918 | declare type TreeSeriesOption$1 = TreeSeriesOption & SeriesInjectedOption;
|
10919 | declare type TreemapSeriesOption$1 = TreemapSeriesOption & SeriesInjectedOption;
|
10920 | declare type GraphSeriesOption$1 = GraphSeriesOption & SeriesInjectedOption;
|
10921 | declare type GaugeSeriesOption$1 = GaugeSeriesOption & SeriesInjectedOption;
|
10922 | declare type FunnelSeriesOption$1 = FunnelSeriesOption & SeriesInjectedOption;
|
10923 | declare type ParallelSeriesOption$1 = ParallelSeriesOption & SeriesInjectedOption;
|
10924 | declare type SankeySeriesOption$1 = SankeySeriesOption & SeriesInjectedOption;
|
10925 | declare type BoxplotSeriesOption$1 = BoxplotSeriesOption & SeriesInjectedOption;
|
10926 | declare type CandlestickSeriesOption$1 = CandlestickSeriesOption & SeriesInjectedOption;
|
10927 | declare type EffectScatterSeriesOption$1 = EffectScatterSeriesOption & SeriesInjectedOption;
|
10928 | declare type LinesSeriesOption$1 = LinesSeriesOption & SeriesInjectedOption;
|
10929 | declare type HeatmapSeriesOption$1 = HeatmapSeriesOption & SeriesInjectedOption;
|
10930 | declare type PictorialBarSeriesOption$1 = PictorialBarSeriesOption & SeriesInjectedOption;
|
10931 | declare type ThemeRiverSeriesOption$1 = ThemeRiverSeriesOption & SeriesInjectedOption;
|
10932 | declare type SunburstSeriesOption$1 = SunburstSeriesOption & SeriesInjectedOption;
|
10933 | declare type CustomSeriesOption$1 = CustomSeriesOption & SeriesInjectedOption;
|
10934 |
|
10935 |
|
10936 |
|
10937 |
|
10938 |
|
10939 |
|
10940 |
|
10941 |
|
10942 |
|
10943 |
|
10944 |
|
10945 |
|
10946 |
|
10947 | interface RegisteredSeriesOption {
|
10948 | line: LineSeriesOption$1;
|
10949 | bar: BarSeriesOption$1;
|
10950 | scatter: ScatterSeriesOption$1;
|
10951 | pie: PieSeriesOption$1;
|
10952 | radar: RadarSeriesOption$1;
|
10953 | map: MapSeriesOption$1;
|
10954 | tree: TreeSeriesOption$1;
|
10955 | treemap: TreemapSeriesOption$1;
|
10956 | graph: GraphSeriesOption$1;
|
10957 | gauge: GaugeSeriesOption$1;
|
10958 | funnel: FunnelSeriesOption$1;
|
10959 | parallel: ParallelSeriesOption$1;
|
10960 | sankey: SankeySeriesOption$1;
|
10961 | boxplot: BoxplotSeriesOption$1;
|
10962 | candlestick: CandlestickSeriesOption$1;
|
10963 | effectScatter: EffectScatterSeriesOption$1;
|
10964 | lines: LinesSeriesOption$1;
|
10965 | heatmap: HeatmapSeriesOption$1;
|
10966 | pictorialBar: PictorialBarSeriesOption$1;
|
10967 | themeRiver: ThemeRiverSeriesOption$1;
|
10968 | sunburst: SunburstSeriesOption$1;
|
10969 | custom: CustomSeriesOption$1;
|
10970 | }
|
10971 | declare type Values<T> = T[keyof T];
|
10972 | declare type SeriesOption$1 = Values<RegisteredSeriesOption>;
|
10973 | interface EChartsOption extends ECBasicOption {
|
10974 | dataset?: DatasetOption | DatasetOption[];
|
10975 | aria?: AriaOption;
|
10976 | title?: TitleOption | TitleOption[];
|
10977 | grid?: GridOption | GridOption[];
|
10978 | radar?: RadarOption | RadarOption[];
|
10979 | polar?: PolarOption | PolarOption[];
|
10980 | geo?: GeoOption | GeoOption[];
|
10981 | angleAxis?: AngleAxisOption | AngleAxisOption[];
|
10982 | radiusAxis?: RadiusAxisOption | RadiusAxisOption[];
|
10983 | xAxis?: XAXisOption | XAXisOption[];
|
10984 | yAxis?: YAXisOption | YAXisOption[];
|
10985 | singleAxis?: SingleAxisOption | SingleAxisOption[];
|
10986 | parallel?: ParallelCoordinateSystemOption | ParallelCoordinateSystemOption[];
|
10987 | parallelAxis?: ParallelAxisOption | ParallelAxisOption[];
|
10988 | calendar?: CalendarOption | CalendarOption[];
|
10989 | toolbox?: ToolboxComponentOption | ToolboxComponentOption[];
|
10990 | tooltip?: TooltipOption | TooltipOption[];
|
10991 | axisPointer?: AxisPointerOption | AxisPointerOption[];
|
10992 | brush?: BrushOption | BrushOption[];
|
10993 | timeline?: TimelineOption | SliderTimelineOption;
|
10994 | legend?: LegendComponentOption | (LegendComponentOption)[];
|
10995 | dataZoom?: DataZoomComponentOption | (DataZoomComponentOption)[];
|
10996 | visualMap?: VisualMapComponentOption | (VisualMapComponentOption)[];
|
10997 | graphic?: GraphicComponentLooseOption | GraphicComponentLooseOption[];
|
10998 | series?: SeriesOption$1 | SeriesOption$1[];
|
10999 | options?: EChartsOption[];
|
11000 | baseOption?: EChartsOption;
|
11001 | }
|
11002 |
|
11003 | export { AngleAxisOption as AngleAxisComponentOption, AnimationDelayCallback, AnimationDelayCallbackParam as AnimationDelayCallbackParams, AnimationDurationCallback, AriaOption as AriaComponentOption, Axis, AxisPointerOption as AxisPointerComponentOption, BarSeriesOption$1 as BarSeriesOption, BoxplotSeriesOption$1 as BoxplotSeriesOption, BrushOption as BrushComponentOption, CalendarOption as CalendarComponentOption, CandlestickSeriesOption$1 as CandlestickSeriesOption, ChartView, ZRColor as Color, ComponentModel, ComponentView, ComposeOption, ContinousVisualMapOption as ContinousVisualMapComponentOption, CustomSeriesOption$1 as CustomSeriesOption, CustomSeriesRenderItem, CustomSeriesRenderItemAPI, CustomSeriesRenderItemParams, CustomSeriesRenderItemReturn, DataZoomComponentOption, DatasetOption as DatasetComponentOption, CallbackDataParams as DefaultLabelFormatterCallbackParams, DownplayPayload, ECElementEvent, EChartsType as ECharts, ECBasicOption as EChartsCoreOption, EChartsInitOpts, EChartsOption, EChartsType, EffectScatterSeriesOption$1 as EffectScatterSeriesOption, ElementEvent, FunnelSeriesOption$1 as FunnelSeriesOption, GaugeSeriesOption$1 as GaugeSeriesOption, GeoOption as GeoComponentOption, GraphSeriesOption$1 as GraphSeriesOption, GraphicComponentLooseOption as GraphicComponentOption, GridOption as GridComponentOption, HeatmapSeriesOption$1 as HeatmapSeriesOption, HighlightPayload, ImagePatternObject, InsideDataZoomOption as InsideDataZoomComponentOption, LabelFormatterCallback, LabelLayoutOptionCallback, LabelLayoutOptionCallbackParams, LegendComponentOption, LineSeriesOption$1 as LineSeriesOption, LinearGradientObject, LinesSeriesOption$1 as LinesSeriesOption, SeriesData as List, MapSeriesOption$1 as MapSeriesOption, MarkAreaOption as MarkAreaComponentOption, MarkLineOption as MarkLineComponentOption, MarkPointOption as MarkPointComponentOption, Model, PRIORITY, ParallelCoordinateSystemOption as ParallelComponentOption, ParallelSeriesOption$1 as ParallelSeriesOption, PatternObject, Payload, PictorialBarSeriesOption$1 as PictorialBarSeriesOption, PieSeriesOption$1 as PieSeriesOption, PiecewiseVisualMapOption as PiecewiseVisualMapComponentOption, LegendOption as PlainLegendComponentOption, PolarOption as PolarComponentOption, RadarOption as RadarComponentOption, RadarSeriesOption$1 as RadarSeriesOption, RadialGradientObject, RadiusAxisOption as RadiusAxisComponentOption, RegisteredSeriesOption, ResizeOpts, SVGPatternObject, SankeySeriesOption$1 as SankeySeriesOption, ScatterSeriesOption$1 as ScatterSeriesOption, ScrollableLegendOption as ScrollableLegendComponentOption, SelectChangedPayload, SeriesModel, SeriesOption$1 as SeriesOption, SetOptionOpts, SetOptionTransitionOpt, SetOptionTransitionOptItem, SingleAxisOption as SingleAxisComponentOption, SliderDataZoomOption as SliderDataZoomComponentOption, SunburstSeriesOption$1 as SunburstSeriesOption, ThemeRiverSeriesOption$1 as ThemeRiverSeriesOption, TimelineOption as TimelineComponentOption, TitleOption as TitleComponentOption, ToolboxComponentOption, TooltipFormatterCallback as TooltipComponentFormatterCallback, TopLevelFormatterParams as TooltipComponentFormatterCallbackParams, TooltipOption as TooltipComponentOption, TooltipPositionCallback as TooltipComponentPositionCallback, TooltipPositionCallbackParams as TooltipComponentPositionCallbackParams, TreeSeriesOption$1 as TreeSeriesOption, TreemapSeriesOption$1 as TreemapSeriesOption, VisualMapComponentOption, XAXisOption as XAXisComponentOption, YAXisOption as YAXisComponentOption, color_d as color, connect, dataTool, dependencies, disConnect, disconnect, dispose$1 as dispose, env, extendChartView, extendComponentModel, extendComponentView, extendSeriesModel, format_d as format, getCoordinateSystemDimensions, getInstanceByDom, getInstanceById, getMap, graphic_d as graphic, helper_d as helper, init$1 as init, brushSingle as innerDrawElementOnCanvas, matrix_d as matrix, number_d as number, parseGeoJSON, parseGeoJSON as parseGeoJson, registerAction, registerCoordinateSystem, registerLayout, registerLoading, registerLocale, registerMap, registerPostInit, registerPostUpdate, registerPreprocessor, registerProcessor, registerTheme, registerTransform, registerUpdateLifecycle, registerVisual, setCanvasCreator, setPlatformAPI, throttle, time_d as time, use, util_d$1 as util, vector_d as vector, version$1 as version, util_d as zrUtil, zrender_d as zrender }; |
\ | No newline at end of file |