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