1 | import { COMPONENT_TYPE, DIRECTION, LAYER } from './constant';
|
2 | import {
|
3 | AxisLabelCfg,
|
4 | AxisLineCfg,
|
5 | AxisSubTickLineCfg,
|
6 | AxisTickLineCfg,
|
7 | AxisTitleCfg,
|
8 | ContinueLegendHandlerCfg,
|
9 | ContinueLegendLabelCfg,
|
10 | ContinueLegendRailCfg,
|
11 | ContinueLegendTrackCfg,
|
12 | Coordinate,
|
13 | CrosshairLineCfg,
|
14 | CrosshairTextBackgroundCfg,
|
15 | CrosshairTextCfg,
|
16 | EnhancedTextCfg,
|
17 | GridLineCfg,
|
18 | GroupComponent,
|
19 | HtmlComponent,
|
20 | ICanvas,
|
21 | IGroup,
|
22 | IShape,
|
23 | CategoryLegendCfg,
|
24 | LegendBackgroundCfg,
|
25 | LegendItemNameCfg,
|
26 | LegendItemValueCfg,
|
27 | LegendMarkerCfg,
|
28 | LegendTitleCfg,
|
29 | LegendPageNavigatorCfg,
|
30 | PathCommand,
|
31 | Scale,
|
32 | ScaleConfig,
|
33 | ShapeAttrs,
|
34 | LineAnnotationTextCfg,
|
35 | TrendCfg,
|
36 | } from './dependents';
|
37 |
|
38 | import { View } from './chart';
|
39 | import { Facet } from './facet';
|
40 | import Element from './geometry/element';
|
41 | import { PaddingCalCtor } from './chart/layout/padding-cal';
|
42 | import { LegendRadio } from '@antv/component';
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | export interface LooseObject {
|
49 | [key: string]: any;
|
50 | }
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | export interface Point {
|
56 | readonly x: number;
|
57 | readonly y: number;
|
58 | }
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | export interface Region {
|
64 | readonly start: Point;
|
65 | readonly end: Point;
|
66 | }
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | export interface Size {
|
72 | readonly width: number;
|
73 | readonly height: number;
|
74 | }
|
75 |
|
76 |
|
77 |
|
78 |
|
79 | export interface RangePoint {
|
80 | readonly x?: number | number[];
|
81 | readonly y?: number | number[];
|
82 | }
|
83 |
|
84 |
|
85 |
|
86 |
|
87 | export type AriaOption =
|
88 | | false
|
89 | | {
|
90 | readonly label: string;
|
91 | };
|
92 |
|
93 |
|
94 |
|
95 |
|
96 | export interface MappingDatum {
|
97 | |
98 |
|
99 |
|
100 | _origin: Datum;
|
101 | |
102 |
|
103 |
|
104 | points?: ShapeVertices;
|
105 | |
106 |
|
107 |
|
108 | nextPoints?: ShapeVertices;
|
109 | |
110 |
|
111 |
|
112 | x?: number[] | number;
|
113 | |
114 |
|
115 |
|
116 | y?: number[] | number;
|
117 | |
118 |
|
119 |
|
120 | color?: string;
|
121 | |
122 |
|
123 |
|
124 | shape?: string | string[];
|
125 | |
126 |
|
127 |
|
128 | size?: number;
|
129 | }
|
130 |
|
131 |
|
132 |
|
133 |
|
134 | export interface ShapeInfo {
|
135 | |
136 |
|
137 |
|
138 | x: number | number[];
|
139 | |
140 |
|
141 |
|
142 | y: number | number[];
|
143 | |
144 |
|
145 |
|
146 | shape?: string | string[];
|
147 | |
148 |
|
149 |
|
150 | size?: number;
|
151 | |
152 |
|
153 |
|
154 | color?: string;
|
155 | |
156 |
|
157 |
|
158 | style?: LooseObject;
|
159 | |
160 |
|
161 |
|
162 | isInCircle?: boolean;
|
163 | |
164 |
|
165 |
|
166 | data?: Datum | Data;
|
167 | |
168 |
|
169 |
|
170 | mappingData?: MappingDatum | MappingDatum[];
|
171 | |
172 |
|
173 |
|
174 | points?: ShapeVertices;
|
175 | |
176 |
|
177 |
|
178 | nextPoints?: ShapeVertices;
|
179 | |
180 |
|
181 |
|
182 | text?: string;
|
183 | |
184 |
|
185 |
|
186 | isStack?: boolean;
|
187 | |
188 |
|
189 |
|
190 | connectNulls?: boolean;
|
191 | |
192 |
|
193 |
|
194 | background?: {
|
195 | style?: ShapeAttrs;
|
196 | };
|
197 | |
198 |
|
199 |
|
200 | showSinglePoint?: boolean;
|
201 | |
202 |
|
203 |
|
204 | defaultStyle?: LooseObject;
|
205 | |
206 |
|
207 |
|
208 | customInfo?: CustomOption;
|
209 | }
|
210 |
|
211 |
|
212 |
|
213 |
|
214 | export interface AnimateCfg {
|
215 | |
216 |
|
217 |
|
218 | readonly easing?: string | AnimateEasingCallback;
|
219 | |
220 |
|
221 |
|
222 | readonly animation?: string;
|
223 | |
224 |
|
225 |
|
226 | readonly duration?: number | AnimateDurationCallback;
|
227 | |
228 |
|
229 |
|
230 | readonly delay?: number | AnimateDelayCallback;
|
231 | |
232 |
|
233 |
|
234 | readonly callback?: () => any;
|
235 | |
236 |
|
237 |
|
238 | readonly repeat?: boolean;
|
239 | }
|
240 |
|
241 |
|
242 |
|
243 |
|
244 | export interface GAnimateCfg {
|
245 | |
246 |
|
247 |
|
248 | readonly duration: number;
|
249 | |
250 |
|
251 |
|
252 | readonly easing?: string;
|
253 | |
254 |
|
255 |
|
256 | readonly animation?: string;
|
257 | |
258 |
|
259 |
|
260 | readonly delay?: number;
|
261 | |
262 |
|
263 |
|
264 | readonly callback?: () => any;
|
265 | |
266 |
|
267 |
|
268 | readonly repeat?: boolean;
|
269 | }
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 | export interface AttributeOption {
|
276 | |
277 |
|
278 |
|
279 | fields?: string[];
|
280 | |
281 |
|
282 |
|
283 | callback?: (...args) => any;
|
284 | |
285 |
|
286 |
|
287 | values?: any[];
|
288 | }
|
289 |
|
290 |
|
291 |
|
292 |
|
293 | export interface AdjustOption {
|
294 | |
295 |
|
296 |
|
297 | readonly type: AdjustType;
|
298 | |
299 |
|
300 |
|
301 |
|
302 |
|
303 | readonly marginRatio?: number;
|
304 | |
305 |
|
306 |
|
307 |
|
308 | readonly dodgeBy?: string;
|
309 | |
310 |
|
311 |
|
312 |
|
313 | readonly reverseOrder?: boolean;
|
314 | }
|
315 |
|
316 |
|
317 |
|
318 |
|
319 | export interface StyleOption {
|
320 | |
321 |
|
322 |
|
323 | readonly fields?: string[];
|
324 | |
325 |
|
326 |
|
327 | readonly callback?: (...args) => LooseObject;
|
328 | |
329 |
|
330 |
|
331 | readonly cfg?: LooseObject;
|
332 | }
|
333 |
|
334 |
|
335 |
|
336 |
|
337 | export type CustomOption = any;
|
338 |
|
339 |
|
340 |
|
341 |
|
342 | export interface GeometryTooltipOption {
|
343 | |
344 |
|
345 |
|
346 | readonly fields: string[];
|
347 | |
348 |
|
349 |
|
350 | readonly callback?: (...args) => LooseObject;
|
351 | }
|
352 |
|
353 | export interface GeometryLabelLayoutCfg {
|
354 | |
355 |
|
356 |
|
357 | type: string;
|
358 | |
359 |
|
360 |
|
361 | cfg?: LooseObject;
|
362 | }
|
363 |
|
364 |
|
365 |
|
366 |
|
367 | export interface GeometryLabelCfg {
|
368 | |
369 |
|
370 |
|
371 |
|
372 | type?: string;
|
373 | |
374 |
|
375 |
|
376 | offset?: number | string;
|
377 | |
378 |
|
379 |
|
380 | offsetX?: number;
|
381 | |
382 |
|
383 |
|
384 | offsetY?: number;
|
385 | |
386 |
|
387 |
|
388 |
|
389 |
|
390 | content?: string | IGroup | IShape | GeometryLabelContentCallback;
|
391 | |
392 |
|
393 |
|
394 |
|
395 | style?: LooseObject;
|
396 | |
397 |
|
398 |
|
399 |
|
400 |
|
401 | autoRotate?: boolean;
|
402 | |
403 |
|
404 |
|
405 |
|
406 | rotate?: number;
|
407 | |
408 |
|
409 |
|
410 |
|
411 | labelHeight?: number;
|
412 | |
413 |
|
414 |
|
415 |
|
416 | labelLine?: null | boolean | { style?: object };
|
417 | |
418 |
|
419 |
|
420 |
|
421 | labelEmit?: boolean;
|
422 | |
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 | layout?: GeometryLabelLayoutCfg | GeometryLabelLayoutCfg[];
|
439 | |
440 |
|
441 |
|
442 |
|
443 | background?: {
|
444 | |
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 | style?: ShapeAttrs;
|
452 | |
453 |
|
454 |
|
455 | padding?: number | number[];
|
456 | };
|
457 | |
458 |
|
459 |
|
460 |
|
461 | position?:
|
462 | | ((data: Datum, mappingData: MappingDatum, index: number) => IntervalGeometryLabelPosition)
|
463 | | IntervalGeometryLabelPosition;
|
464 | /**
|
465 | * @title 动画配置。
|
466 | */
|
467 | animate?: AnimateOption | false | null;
|
468 | }
|
469 |
|
470 | /**
|
471 | * @title `geometry().label({})` 配置定义
|
472 | */
|
473 | export interface LabelOption {
|
474 | /**
|
475 | * @title 映射的字段。
|
476 | */
|
477 | fields?: string[];
|
478 | /**
|
479 | * @title 回调函数。
|
480 | */
|
481 | callback?: LabelCallback;
|
482 | cfg?: GeometryLabelCfg;
|
483 | }
|
484 |
|
485 | /**
|
486 | * @title Geometry 下每个 state 的配置结构
|
487 | */
|
488 | export interface StateCfg {
|
489 | /**
|
490 | * @title 状态样式配置。
|
491 | */
|
492 | style?: object | StateStyleCallback;
|
493 | }
|
494 |
|
495 | /**
|
496 | * @title geometry.state({}) 配置定义
|
497 | */
|
498 | export interface StateOption {
|
499 | /**
|
500 | * @title 默认状态样式。
|
501 | */
|
502 | default?: StateCfg;
|
503 | /**
|
504 | * @title active 状态配置。
|
505 | */
|
506 | active?: StateCfg;
|
507 | /**
|
508 | * @title inactive 状态配置。
|
509 | */
|
510 | inactive?: StateCfg;
|
511 | /**
|
512 | * @title selected 状态配置。
|
513 | */
|
514 | selected?: StateCfg;
|
515 | }
|
516 |
|
517 | /**
|
518 | * @title interval label 的位置
|
519 | */
|
520 | export type IntervalGeometryLabelPosition = 'top' | 'bottom' | 'middle' | 'left' | 'right';
|
521 | /**
|
522 | * @title G2 提供的 adjust 类型
|
523 | */
|
524 | export type AdjustType = 'stack' | 'jitter' | 'dodge' | 'symmetric';
|
525 | /**
|
526 | * @title geometry.color() 图形属性回调函数定义
|
527 | */
|
528 | export type ColorAttrCallback = (...args) => string;
|
529 |
|
530 |
|
531 |
|
532 | export type ShapeAttrCallback = (...args) => string | any[];
|
533 |
|
534 |
|
535 |
|
536 | export type SizeAttrCallback = (...args) => number;
|
537 |
|
538 |
|
539 |
|
540 | export type TooltipCallback = (...args) => LooseObject;
|
541 |
|
542 |
|
543 |
|
544 | export type StyleCallback = (...args) => LooseObject;
|
545 |
|
546 |
|
547 |
|
548 | export type LabelCallback = (...args) => GeometryLabelCfg | null | undefined;
|
549 |
|
550 |
|
551 |
|
552 | export type GeometryLabelContentCallback = (
|
553 | data: Datum,
|
554 | mappingData: MappingDatum,
|
555 | index: number
|
556 | ) => string | IShape | IGroup;
|
557 |
|
558 |
|
559 |
|
560 | export type StateStyleCallback = (element: Element) => LooseObject;
|
561 |
|
562 |
|
563 |
|
564 |
|
565 |
|
566 | export interface ShapeMarkerCfg {
|
567 | |
568 |
|
569 |
|
570 | color: string;
|
571 | |
572 |
|
573 |
|
574 | isInPolar: boolean;
|
575 | }
|
576 |
|
577 |
|
578 |
|
579 |
|
580 | export interface ShapeMarkerAttrs {
|
581 | |
582 |
|
583 |
|
584 | symbol: string | ShapeMarkerSymbol;
|
585 | |
586 |
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 |
|
624 |
|
625 |
|
626 |
|
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 |
|
636 |
|
637 |
|
638 |
|
639 |
|
640 |
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 |
|
652 |
|
653 |
|
654 | style: ShapeAttrs;
|
655 | }
|
656 |
|
657 |
|
658 |
|
659 |
|
660 | export interface ShapePoint {
|
661 | |
662 |
|
663 |
|
664 | readonly x: number | number[];
|
665 | |
666 |
|
667 |
|
668 | readonly y?: number | number[];
|
669 | |
670 |
|
671 |
|
672 | readonly y0?: number;
|
673 | |
674 |
|
675 |
|
676 | size?: number;
|
677 | }
|
678 |
|
679 |
|
680 |
|
681 |
|
682 | export type ViolinShapePoint = ShapePoint & { _size?: number[] };
|
683 |
|
684 |
|
685 |
|
686 |
|
687 | export interface RegisterShapeFactory {
|
688 | |
689 |
|
690 |
|
691 | readonly defaultShapeType: string;
|
692 | |
693 |
|
694 |
|
695 | readonly getDefaultPoints?: (pointInfo: ShapePoint) => Point[];
|
696 | |
697 |
|
698 |
|
699 | readonly getDefaultStyle?: (geometryTheme: LooseObject) => LooseObject;
|
700 | |
701 |
|
702 |
|
703 | readonly getMarker?: (shapeType: string, markerCfg: ShapeMarkerCfg) => ShapeMarkerAttrs;
|
704 | |
705 |
|
706 |
|
707 | readonly drawShape?: (shapeType: string, cfg: ShapeInfo, container: IGroup) => IShape | IGroup;
|
708 | }
|
709 |
|
710 |
|
711 |
|
712 |
|
713 | export interface RegisterShape {
|
714 | |
715 |
|
716 |
|
717 | readonly getPoints?: (pointInfo: ShapePoint) => Point[];
|
718 | |
719 |
|
720 |
|
721 | readonly getMarker?: (markerCfg: ShapeMarkerCfg) => ShapeMarkerAttrs;
|
722 | |
723 |
|
724 |
|
725 | readonly draw: (cfg: ShapeInfo, container: IGroup) => IShape | IGroup | void;
|
726 | }
|
727 |
|
728 |
|
729 |
|
730 |
|
731 | export interface Shape extends RegisterShape {
|
732 | |
733 |
|
734 |
|
735 | coordinate: Coordinate;
|
736 | |
737 |
|
738 |
|
739 | parsePath: (path: any) => PathCommand[];
|
740 | |
741 |
|
742 |
|
743 | parsePoint: (point: Point) => Point;
|
744 | |
745 |
|
746 |
|
747 | parsePoints: (points: Point[]) => Point[];
|
748 | }
|
749 |
|
750 |
|
751 |
|
752 |
|
753 | export interface ShapeFactory extends RegisterShapeFactory {
|
754 | |
755 |
|
756 |
|
757 | geometryType: string;
|
758 | |
759 |
|
760 |
|
761 | coordinate: Coordinate;
|
762 | |
763 |
|
764 |
|
765 | theme: LooseObject;
|
766 | |
767 |
|
768 |
|
769 | getShape: (shapeType: string | string[]) => Shape;
|
770 | |
771 |
|
772 |
|
773 | getShapePoints: (shapeType: string | string[], pointInfo: ShapePoint) => Point[];
|
774 | }
|
775 |
|
776 |
|
777 |
|
778 |
|
779 | export type ShapeMarkerSymbol = (x: number, y: number, r: number) => PathCommand[];
|
780 |
|
781 |
|
782 |
|
783 |
|
784 |
|
785 | export type AnnotationPositionCallback = (
|
786 | xScales: Scale[] | Record<string, Scale>,
|
787 | yScales: Scale[] | Record<string, Scale>
|
788 | ) => [number | string, number | string];
|
789 |
|
790 |
|
791 |
|
792 | export type AnnotationPosition =
|
793 | | [number | string, number | string]
|
794 | | Record<string, number | string>
|
795 | | AnnotationPositionCallback;
|
796 |
|
797 |
|
798 |
|
799 |
|
800 | export interface AnnotationBaseOption {
|
801 | |
802 |
|
803 |
|
804 | readonly type?: string;
|
805 | |
806 |
|
807 |
|
808 |
|
809 | readonly top?: boolean;
|
810 | |
811 |
|
812 |
|
813 | readonly animate?: boolean;
|
814 | |
815 |
|
816 |
|
817 |
|
818 | readonly animateOption?: ComponentAnimateOption;
|
819 | |
820 |
|
821 |
|
822 | readonly offsetX?: number;
|
823 | |
824 |
|
825 |
|
826 | readonly offsetY?: number;
|
827 | }
|
828 |
|
829 |
|
830 |
|
831 |
|
832 | export interface RegionPositionBaseOption extends AnnotationBaseOption {
|
833 | |
834 |
|
835 |
|
836 | readonly start: AnnotationPosition;
|
837 | |
838 |
|
839 |
|
840 | readonly end: AnnotationPosition;
|
841 | |
842 |
|
843 |
|
844 | readonly style?: ShapeAttrs;
|
845 | }
|
846 |
|
847 |
|
848 |
|
849 |
|
850 | export interface PointPositionBaseOption extends AnnotationBaseOption {
|
851 | |
852 |
|
853 |
|
854 | readonly position: AnnotationPosition;
|
855 | }
|
856 |
|
857 |
|
858 |
|
859 |
|
860 | export interface ImageOption extends RegionPositionBaseOption {
|
861 | |
862 |
|
863 |
|
864 | readonly src: string;
|
865 | }
|
866 |
|
867 |
|
868 |
|
869 |
|
870 | export interface LineOption extends RegionPositionBaseOption {
|
871 | |
872 |
|
873 |
|
874 | readonly text?: LineAnnotationTextCfg;
|
875 | }
|
876 |
|
877 |
|
878 |
|
879 | export type ArcOption = RegionPositionBaseOption;
|
880 |
|
881 |
|
882 |
|
883 | export type RegionOption = RegionPositionBaseOption;
|
884 |
|
885 |
|
886 |
|
887 | export interface TextOption extends PointPositionBaseOption, Omit<EnhancedTextCfg, 'content'> {
|
888 | content?: string | number | ((filteredData: object[]) => string | number);
|
889 | }
|
890 | /**
|
891 | * @title 使用 DataMarker Annotation 组件的配置定义
|
892 | */
|
893 | export interface DataMarkerOption extends PointPositionBaseOption {
|
894 | /**
|
895 | * @title point 设置
|
896 | */
|
897 | readonly point?: null | { style?: ShapeAttrs };
|
898 | /**
|
899 | * @title line 设置
|
900 | */
|
901 | readonly line?: null | { style?: ShapeAttrs; length?: number };
|
902 | /**
|
903 | * @title text 设置
|
904 | */
|
905 | readonly text: null | EnhancedTextCfg;
|
906 | /**
|
907 | * @title 文本超出绘制区域时,是否自动调节文本方向,默认为 true
|
908 | */
|
909 | readonly autoAdjust?: boolean;
|
910 | /**
|
911 | * @title 朝向,默认为 upward,可选值为 'upward' 或者 'downward'
|
912 | */
|
913 | readonly direction?: 'upward' | 'downward';
|
914 | }
|
915 | /**
|
916 | * @title 使用 DataRegion Annotation 组件的配置定义
|
917 | */
|
918 | export interface DataRegionOption extends RegionPositionBaseOption {
|
919 | /**
|
920 | * @title line长度,default为 0
|
921 | */
|
922 | readonly lineLength?: number;
|
923 | /**
|
924 | * @title 标注区间的配置
|
925 | */
|
926 | readonly region?: null | { style?: ShapeAttrs };
|
927 | /**
|
928 | * @title 文本的配置
|
929 | */
|
930 | readonly text?: null | EnhancedTextCfg;
|
931 | }
|
932 | /**
|
933 | * @title 使用 RegionFilter Annotation 组件的配置定义
|
934 | */
|
935 | export interface RegionFilterOption extends RegionPositionBaseOption {
|
936 | /**
|
937 | * @title 染色色值
|
938 | */
|
939 | readonly color: string;
|
940 | /**
|
941 | * @title 适用场景
|
942 | * @description 可选,设定regionFilter只对特定geom类型起作用,如apply:['area']
|
943 | */
|
944 | readonly apply?: string[];
|
945 | }
|
946 |
|
947 | /**
|
948 | * @title Shape Annotation 的配置
|
949 | */
|
950 | export interface ShapeAnnotationOption extends AnnotationBaseOption {
|
951 | /**
|
952 | * @title 自定义 Annotation 绘制函数
|
953 | */
|
954 | render: (
|
955 | container: IGroup,
|
956 | view: View,
|
957 | helpers: { parsePosition: (position: [string | number, string | number] | Datum) => Point }
|
958 | ) => void;
|
959 | }
|
960 |
|
961 |
|
962 |
|
963 |
|
964 | export interface HtmlAnnotationOption extends PointPositionBaseOption {
|
965 | |
966 |
|
967 |
|
968 | container?: string | HTMLElement;
|
969 | |
970 |
|
971 |
|
972 | html: string | HTMLElement | ((container: HTMLElement, view: View) => void | string | HTMLElement);
|
973 | /**
|
974 | * @title X 方向对齐
|
975 | */
|
976 | alignX?: 'left' | 'middle' | 'right';
|
977 | /**
|
978 | * @title Y 方向对齐
|
979 | */
|
980 | alignY?: 'top' | 'middle' | 'bottom';
|
981 | /**
|
982 | * @title X 方向偏移
|
983 | */
|
984 | offsetX?: number;
|
985 | /**
|
986 | * @title Y 方向偏移
|
987 | */
|
988 | offsetY?: number;
|
989 | }
|
990 |
|
991 | // ============================ Chart && View 上的类型定义 ============================
|
992 | /**
|
993 | * @title Tooltip 内容框的 css 样式定义
|
994 | */
|
995 | export interface TooltipDomStyles {
|
996 | 'g2-tooltip'?: LooseObject;
|
997 | 'g2-tooltip-title'?: LooseObject;
|
998 | 'g2-tooltip-list'?: LooseObject;
|
999 | 'g2-tooltip-list-item'?: LooseObject;
|
1000 | 'g2-tooltip-marker'?: LooseObject;
|
1001 | 'g2-tooltip-value'?: LooseObject;
|
1002 | 'g2-tooltip-name'?: LooseObject;
|
1003 | }
|
1004 |
|
1005 | /**
|
1006 | * @title 目前组件动画允许的参数配置
|
1007 | */
|
1008 | export interface ComponentAnimateCfg {
|
1009 | /**
|
1010 | * @title 动画执行时间
|
1011 | */
|
1012 | readonly duration?: number;
|
1013 | /**
|
1014 | * @title 动画缓动函数
|
1015 | */
|
1016 | readonly easing?: string;
|
1017 | /**
|
1018 | * @title 动画延迟时间
|
1019 | */
|
1020 | readonly delay?: number;
|
1021 | }
|
1022 | /**
|
1023 | * @title 组件各个动画类型配置
|
1024 | */
|
1025 | export interface ComponentAnimateOption {
|
1026 | /**
|
1027 | * @title 初入场动画配置
|
1028 | */
|
1029 | appear?: ComponentAnimateCfg;
|
1030 | /**
|
1031 | * @title 更新动画配置
|
1032 | */
|
1033 | update?: ComponentAnimateCfg;
|
1034 | /**
|
1035 | * @title 更新后新入场的动画配置
|
1036 | */
|
1037 | enter?: ComponentAnimateCfg;
|
1038 | /**
|
1039 | * @title 离场动画配置
|
1040 | */
|
1041 | leave?: ComponentAnimateCfg;
|
1042 | }
|
1043 |
|
1044 | /**
|
1045 | * @title 列定义配置项
|
1046 | */
|
1047 | export interface ScaleOption extends ScaleConfig {
|
1048 | /**
|
1049 | * @title 声明度量类型。
|
1050 | */
|
1051 | type?: ScaleType;
|
1052 | /**
|
1053 | * @title 同步 scale
|
1054 | *
|
1055 | * @example
|
1056 | * ```ts
|
1057 | * chart.scale({
|
1058 | * x: { sync: true },
|
1059 | * y: { sync: true },
|
1060 | * x1: { sync: 'x1' },
|
1061 | * x2: { sync: 'x1' },
|
1062 | * });
|
1063 | * ```
|
1064 | *
|
1065 | * 通过以上配置,我们会分别对 x 和 y 两个字段,x1 和 x2 两个字段进行同步度量操作。
|
1066 | */
|
1067 | sync?: boolean | string;
|
1068 | /**
|
1069 | * @title 是否显示最后的 tick
|
1070 | * @description 只对 `type: 'cat'` 以及 `type: 'time-cat'` 的 scale 生效,强制显示最后的日期 tick。
|
1071 | */
|
1072 | showLast?: boolean;
|
1073 | /**
|
1074 | * @title 唯一 ID
|
1075 | * @description
|
1076 | * 用于声明使用数据记录中的哪些字段来组成一条数据的唯一 id(如有多个字段,则使用 '-' 连接)。
|
1077 | * 数据 id 用于标识 Element 图形元素,应用于 Geometry 中的图形元素 Element 更新。
|
1078 | * 默认 G2 内部会有一套 ID 生成规则,如果不能满足用户需求,用户既可以使用该属性配置 id。
|
1079 | * @example
|
1080 | * 下面的例子中,声明了将 'x' 和 'y' 字段的数值来作为每条数据记录的 id,即下面数据两条数据的 id 分别为:'1-23' 和 '2-2'。
|
1081 | * ```ts
|
1082 | * const data = [
|
1083 | * { x: 1, y: 23, z: 'a' },
|
1084 | * { x: 2, y: 2, z: 'b' },
|
1085 | * ];
|
1086 | *
|
1087 | * chart.scale({
|
1088 | * x: { key: true },
|
1089 | * y: { key: true },
|
1090 | * });
|
1091 | * ```
|
1092 | */
|
1093 | key?: boolean;
|
1094 | }
|
1095 |
|
1096 | /**
|
1097 | * @title Geometry 动画参数配置。geometry.animate()
|
1098 | */
|
1099 | export interface AnimateOption {
|
1100 | /**
|
1101 | * @title chart 初始化渲染时的入场动画,false/null 表示关闭入场动画。
|
1102 | */
|
1103 | appear?: AnimateCfg | false | null;
|
1104 | /**
|
1105 | * @title chart 发生更新时,新增元素的入场动画,false/null 表示关闭入场动画。
|
1106 | */
|
1107 | enter?: AnimateCfg | false | null;
|
1108 | /**
|
1109 | * @title 更新动画配置,false/null 表示关闭更新动画。
|
1110 | */
|
1111 | update?: AnimateCfg | false | null;
|
1112 | /**
|
1113 | * @title 销毁动画配置,false/null 表示关闭销毁动画。
|
1114 | */
|
1115 | leave?: AnimateCfg | false | null;
|
1116 | }
|
1117 |
|
1118 | /**
|
1119 | * @title 用于配置项式声明交互行为
|
1120 | */
|
1121 | export interface InteractionOption {
|
1122 | /**
|
1123 | * @title 交互名称
|
1124 | */
|
1125 | type: string;
|
1126 | /**
|
1127 | * @title 交互配置
|
1128 | */
|
1129 | cfg?: LooseObject;
|
1130 | }
|
1131 |
|
1132 | /**
|
1133 | * @title 用于配置项式的 Geometry 创建方式
|
1134 | */
|
1135 | export interface GeometryOption {
|
1136 | /**
|
1137 | * @title Geometry 的类型。
|
1138 | */
|
1139 | type?: 'interval' | 'line' | 'path' | 'point' | 'area' | 'polygon' | 'schema' | 'edge' | 'heatmap' | string;
|
1140 | /**
|
1141 | * @title position 通道映射规则,对应 `geometry.position()`。
|
1142 | */
|
1143 | position?: string | AttributeOption;
|
1144 | /**
|
1145 | * @title color 通道映射规则,对应 `geometry.color()`。
|
1146 | */
|
1147 | color?: string | AttributeOption;
|
1148 | /**
|
1149 | * @title shape 通道映射规则,对应 `geometry.shape()`。
|
1150 | */
|
1151 | shape?: string | AttributeOption;
|
1152 | /**
|
1153 | * @title size 通道映射规则,对应 `geometry.size()`。
|
1154 | */
|
1155 | size?: number | string | AttributeOption;
|
1156 | /**
|
1157 | * @title adjust 数据调整方式,对应 `geometry.adjust()`。
|
1158 | */
|
1159 | adjust?: string | string[] | AdjustOption | AdjustOption[];
|
1160 | /**
|
1161 | * @title style 样式配置,对应 `geometry.size()`。
|
1162 | */
|
1163 | style?: StyleOption | LooseObject;
|
1164 | /**
|
1165 | * @title tooltip 配置,对应 `geometry.tooltip()`。
|
1166 | */
|
1167 | tooltip?: GeometryTooltipOption | boolean | string;
|
1168 | /**
|
1169 | * @title Geometry 动画配置,对应 `geometry.animate()`。
|
1170 | */
|
1171 | animate?: AnimateOption | boolean;
|
1172 | /**
|
1173 | * @title Label 配置,对应 `geometry.label()`。
|
1174 | */
|
1175 | label?: LabelOption | false | string;
|
1176 | /**
|
1177 | * @title state 样式配置,对应 `geometry.state()`。
|
1178 | */
|
1179 | state?: StateOption;
|
1180 | /**
|
1181 | * @title 其他配置
|
1182 | */
|
1183 | cfg?: {
|
1184 | /**
|
1185 | * @title 是否对数据进行排序
|
1186 | */
|
1187 | sortable?: boolean;
|
1188 | /**
|
1189 | * @title 是否可见
|
1190 | */
|
1191 | visible?: boolean;
|
1192 | /**
|
1193 | * @title 是否连接空值,仅对 'line', 'area' 和 'path' 生效
|
1194 | */
|
1195 | connectNulls?: boolean;
|
1196 | };
|
1197 | }
|
1198 |
|
1199 | /**
|
1200 | * @title 用于配置型式的 View 声明方式
|
1201 | */
|
1202 | export interface ViewOption {
|
1203 | /**
|
1204 | * @title view 的唯一表示 ID
|
1205 | */
|
1206 | readonly id?: string;
|
1207 | /**
|
1208 | * @title view 的绘制范围,起始点为左上角。
|
1209 | */
|
1210 | readonly region?: Region;
|
1211 | /**
|
1212 | * 设置图表的内边距,使用方式参考 CSS 盒模型。
|
1213 | * 下图黄色区域即为 padding 的范围。
|
1214 | * ![](https:
|
1215 | *
|
1216 | * @example
|
1217 | * 1. padding: 20
|
1218 | * 2. padding: [ 10, 30, 30 ]
|
1219 | */
|
1220 | readonly padding?: ViewPadding;
|
1221 | |
1222 |
|
1223 |
|
1224 | readonly theme?: LooseObject | string;
|
1225 | |
1226 |
|
1227 |
|
1228 | readonly visible?: boolean;
|
1229 | |
1230 |
|
1231 |
|
1232 | readonly options?: Options;
|
1233 | }
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 | export interface ChartCfg
|
1239 | extends Omit<ViewCfg, 'parent' | 'canvas' | 'foregroundGroup' | 'middleGroup' | 'backgroundGroup' | 'region'> {
|
1240 | |
1241 |
|
1242 |
|
1243 | readonly container: string | HTMLElement;
|
1244 | |
1245 |
|
1246 |
|
1247 | readonly width?: number;
|
1248 | |
1249 |
|
1250 |
|
1251 | readonly height?: number;
|
1252 | |
1253 |
|
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 | readonly autoFit?: boolean;
|
1260 | |
1261 |
|
1262 |
|
1263 |
|
1264 | readonly renderer?: Renderer;
|
1265 | |
1266 |
|
1267 |
|
1268 |
|
1269 | readonly pixelRatio?: number;
|
1270 | |
1271 |
|
1272 |
|
1273 |
|
1274 | readonly localRefresh?: boolean;
|
1275 | |
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 | readonly supportCSSTransform?: boolean;
|
1281 | |
1282 |
|
1283 |
|
1284 | readonly defaultInteractions?: string[];
|
1285 | }
|
1286 |
|
1287 | export type SyncViewPaddingFn = (chart: View, views: View[], PC: PaddingCalCtor) => void;
|
1288 |
|
1289 |
|
1290 |
|
1291 |
|
1292 | export interface ViewCfg {
|
1293 | |
1294 |
|
1295 |
|
1296 | readonly id?: string;
|
1297 | |
1298 |
|
1299 |
|
1300 | readonly parent: View;
|
1301 | |
1302 |
|
1303 |
|
1304 | readonly canvas: ICanvas;
|
1305 | |
1306 |
|
1307 |
|
1308 | readonly foregroundGroup: IGroup;
|
1309 | |
1310 |
|
1311 |
|
1312 | readonly middleGroup: IGroup;
|
1313 | |
1314 |
|
1315 |
|
1316 | readonly backgroundGroup: IGroup;
|
1317 | |
1318 |
|
1319 |
|
1320 | readonly region?: Region;
|
1321 | |
1322 |
|
1323 |
|
1324 | readonly limitInPlot?: boolean;
|
1325 | |
1326 |
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 | readonly padding?: ViewPadding;
|
1334 | |
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 |
|
1341 | readonly appendPadding?: ViewAppendPadding;
|
1342 | |
1343 |
|
1344 |
|
1345 |
|
1346 |
|
1347 |
|
1348 |
|
1349 |
|
1350 |
|
1351 |
|
1352 | readonly syncViewPadding?: boolean | SyncViewPaddingFn;
|
1353 | |
1354 |
|
1355 |
|
1356 |
|
1357 | readonly theme?: LooseObject | string;
|
1358 | |
1359 |
|
1360 |
|
1361 | readonly options?: Options;
|
1362 | |
1363 |
|
1364 |
|
1365 | readonly visible?: boolean;
|
1366 | }
|
1367 |
|
1368 |
|
1369 |
|
1370 |
|
1371 |
|
1372 | export interface ComponentOption {
|
1373 | readonly id?: string;
|
1374 | readonly component: GroupComponent | HtmlComponent;
|
1375 | readonly layer: LAYER;
|
1376 | direction: DIRECTION;
|
1377 | readonly type: COMPONENT_TYPE;
|
1378 |
|
1379 | readonly extra?: any;
|
1380 | }
|
1381 |
|
1382 |
|
1383 |
|
1384 |
|
1385 | export interface MarkerCfg extends LegendMarkerCfg {
|
1386 | |
1387 |
|
1388 |
|
1389 | symbol?: Marker | MarkerCallback;
|
1390 | style?: ShapeAttrs | ((style: ShapeAttrs) => ShapeAttrs);
|
1391 | }
|
1392 |
|
1393 |
|
1394 |
|
1395 |
|
1396 | export interface LegendItem {
|
1397 | |
1398 |
|
1399 |
|
1400 | id?: string;
|
1401 | |
1402 |
|
1403 |
|
1404 | name: string;
|
1405 | |
1406 |
|
1407 |
|
1408 | value: any;
|
1409 | |
1410 |
|
1411 |
|
1412 | marker?: MarkerCfg | ((name: string, index: number, item: { name: string; value: string } & MarkerCfg) => MarkerCfg);
|
1413 | |
1414 |
|
1415 |
|
1416 | unchecked?: boolean;
|
1417 | }
|
1418 |
|
1419 | export interface G2LegendTitleCfg extends LegendTitleCfg {
|
1420 | |
1421 |
|
1422 |
|
1423 | text?: string;
|
1424 | }
|
1425 |
|
1426 |
|
1427 |
|
1428 |
|
1429 | export interface LegendCfg extends Omit<CategoryLegendCfg, 'marker'> {
|
1430 | |
1431 |
|
1432 |
|
1433 |
|
1434 | readonly custom?: boolean;
|
1435 | |
1436 |
|
1437 |
|
1438 |
|
1439 | layout?: 'horizontal' | 'vertical';
|
1440 | |
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 |
|
1446 |
|
1447 |
|
1448 |
|
1449 |
|
1450 |
|
1451 |
|
1452 |
|
1453 |
|
1454 |
|
1455 | title?: G2LegendTitleCfg;
|
1456 | |
1457 |
|
1458 |
|
1459 |
|
1460 |
|
1461 |
|
1462 |
|
1463 |
|
1464 |
|
1465 |
|
1466 |
|
1467 |
|
1468 |
|
1469 |
|
1470 | background?: LegendBackgroundCfg;
|
1471 | |
1472 |
|
1473 |
|
1474 | position?:
|
1475 | | 'top'
|
1476 | | 'top-left'
|
1477 | | 'top-right'
|
1478 | | 'right'
|
1479 | | 'right-top'
|
1480 | | 'right-bottom'
|
1481 | | 'left'
|
1482 | | 'left-top'
|
1483 | | 'left-bottom'
|
1484 | | 'bottom'
|
1485 | | 'bottom-left'
|
1486 | | 'bottom-right';
|
1487 | |
1488 |
|
1489 |
|
1490 | animate?: boolean;
|
1491 | |
1492 |
|
1493 |
|
1494 |
|
1495 | animateOption?: ComponentAnimateOption;
|
1496 | |
1497 |
|
1498 |
|
1499 |
|
1500 | itemSpacing?: number;
|
1501 | |
1502 |
|
1503 |
|
1504 |
|
1505 | itemMarginBottom?: number;
|
1506 | |
1507 |
|
1508 |
|
1509 |
|
1510 |
|
1511 |
|
1512 |
|
1513 | maxItemWidth?: number;
|
1514 | |
1515 |
|
1516 |
|
1517 |
|
1518 | itemWidth?: number;
|
1519 | |
1520 |
|
1521 |
|
1522 |
|
1523 | itemHeight?: number;
|
1524 | |
1525 |
|
1526 |
|
1527 |
|
1528 |
|
1529 |
|
1530 |
|
1531 |
|
1532 |
|
1533 |
|
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 |
|
1540 | itemName?: LegendItemNameCfg;
|
1541 | |
1542 |
|
1543 |
|
1544 |
|
1545 |
|
1546 |
|
1547 |
|
1548 |
|
1549 |
|
1550 |
|
1551 |
|
1552 |
|
1553 |
|
1554 |
|
1555 |
|
1556 |
|
1557 | itemValue?: LegendItemValueCfg;
|
1558 | |
1559 |
|
1560 |
|
1561 |
|
1562 | maxWidth?: number;
|
1563 | |
1564 |
|
1565 |
|
1566 |
|
1567 | maxHeight?: number;
|
1568 | |
1569 |
|
1570 |
|
1571 |
|
1572 | maxWidthRatio?: number;
|
1573 | |
1574 |
|
1575 |
|
1576 |
|
1577 | maxHeightRatio?: number;
|
1578 | |
1579 |
|
1580 |
|
1581 |
|
1582 | marker?: MarkerCfg | ((name: string, index: number, item: { name: string; value: string } & MarkerCfg) => MarkerCfg);
|
1583 | |
1584 |
|
1585 |
|
1586 |
|
1587 | flipPage?: boolean;
|
1588 | |
1589 |
|
1590 |
|
1591 |
|
1592 | pageNavigator?: LegendPageNavigatorCfg;
|
1593 | |
1594 |
|
1595 |
|
1596 |
|
1597 | items?: LegendItem[];
|
1598 | |
1599 |
|
1600 |
|
1601 |
|
1602 | radio?: LegendRadio;
|
1603 | |
1604 |
|
1605 |
|
1606 |
|
1607 | reversed?: boolean;
|
1608 |
|
1609 | |
1610 |
|
1611 |
|
1612 |
|
1613 | min?: number;
|
1614 | |
1615 |
|
1616 |
|
1617 |
|
1618 | max?: number;
|
1619 | |
1620 |
|
1621 |
|
1622 |
|
1623 | value?: number[];
|
1624 | |
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 |
|
1630 |
|
1631 |
|
1632 |
|
1633 |
|
1634 |
|
1635 |
|
1636 |
|
1637 |
|
1638 | track?: ContinueLegendTrackCfg;
|
1639 | |
1640 |
|
1641 |
|
1642 |
|
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 | rail?: ContinueLegendRailCfg;
|
1657 | |
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 | label?: ContinueLegendLabelCfg;
|
1677 | |
1678 |
|
1679 |
|
1680 |
|
1681 |
|
1682 |
|
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 |
|
1692 | handler?: ContinueLegendHandlerCfg;
|
1693 | |
1694 |
|
1695 |
|
1696 |
|
1697 | slidable?: boolean;
|
1698 | |
1699 |
|
1700 |
|
1701 | offsetX?: number;
|
1702 | |
1703 |
|
1704 |
|
1705 | offsetY?: number;
|
1706 | |
1707 |
|
1708 |
|
1709 | padding?: number[];
|
1710 | |
1711 |
|
1712 |
|
1713 | selected?: {
|
1714 | [key: string]: boolean;
|
1715 | };
|
1716 | }
|
1717 |
|
1718 |
|
1719 |
|
1720 |
|
1721 | export interface TooltipCrosshairsText extends CrosshairTextCfg {
|
1722 | |
1723 |
|
1724 |
|
1725 | content?: string;
|
1726 | }
|
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 | export type TooltipCrosshairsTextCallback = (
|
1737 | type: string,
|
1738 | defaultContent: any,
|
1739 | items: any[],
|
1740 | currentPoint: Point
|
1741 | ) => TooltipCrosshairsText;
|
1742 |
|
1743 |
|
1744 |
|
1745 | export interface TooltipCrosshairs {
|
1746 | |
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 |
|
1752 |
|
1753 |
|
1754 |
|
1755 |
|
1756 |
|
1757 | type?: 'x' | 'y' | 'xy';
|
1758 | |
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 |
|
1768 |
|
1769 |
|
1770 |
|
1771 | line?: CrosshairLineCfg;
|
1772 | |
1773 |
|
1774 |
|
1775 |
|
1776 | text?: TooltipCrosshairsText | TooltipCrosshairsTextCallback;
|
1777 | |
1778 |
|
1779 |
|
1780 |
|
1781 |
|
1782 |
|
1783 |
|
1784 |
|
1785 |
|
1786 |
|
1787 |
|
1788 |
|
1789 |
|
1790 |
|
1791 | textBackground?: CrosshairTextBackgroundCfg;
|
1792 | |
1793 |
|
1794 |
|
1795 |
|
1796 |
|
1797 | follow?: boolean;
|
1798 | }
|
1799 |
|
1800 | export type TooltipTitle = string | ((title: string, datum: Datum) => string);
|
1801 |
|
1802 | export type TooltipItem = {
|
1803 | |
1804 |
|
1805 |
|
1806 | readonly data: Datum;
|
1807 | |
1808 |
|
1809 |
|
1810 | readonly mappingData: Datum;
|
1811 | |
1812 |
|
1813 |
|
1814 | readonly name: string;
|
1815 | |
1816 |
|
1817 |
|
1818 | readonly value: string | number;
|
1819 | |
1820 |
|
1821 |
|
1822 | readonly color: string;
|
1823 | |
1824 |
|
1825 |
|
1826 | readonly marker: string;
|
1827 | };
|
1828 |
|
1829 |
|
1830 |
|
1831 |
|
1832 | export interface TooltipCfg {
|
1833 | |
1834 |
|
1835 |
|
1836 |
|
1837 |
|
1838 | follow?: boolean;
|
1839 | |
1840 |
|
1841 |
|
1842 |
|
1843 | enterable?: boolean;
|
1844 | |
1845 |
|
1846 |
|
1847 |
|
1848 |
|
1849 | showDelay?: number;
|
1850 | |
1851 |
|
1852 |
|
1853 | showTitle?: boolean;
|
1854 | |
1855 |
|
1856 |
|
1857 |
|
1858 |
|
1859 |
|
1860 | title?: TooltipTitle;
|
1861 | |
1862 |
|
1863 |
|
1864 | position?: 'top' | 'bottom' | 'left' | 'right';
|
1865 | |
1866 |
|
1867 |
|
1868 |
|
1869 | shared?: boolean;
|
1870 | |
1871 |
|
1872 |
|
1873 | showCrosshairs?: boolean;
|
1874 | |
1875 |
|
1876 |
|
1877 |
|
1878 | crosshairs?: TooltipCrosshairs;
|
1879 | |
1880 |
|
1881 |
|
1882 | showMarkers?: boolean;
|
1883 | |
1884 |
|
1885 |
|
1886 | marker?: object;
|
1887 | |
1888 |
|
1889 |
|
1890 | showContent?: boolean | ((datum: Datum) => boolean);
|
1891 | |
1892 |
|
1893 |
|
1894 | container?: string | HTMLElement;
|
1895 | |
1896 |
|
1897 |
|
1898 |
|
1899 | containerTpl?: string;
|
1900 | |
1901 |
|
1902 |
|
1903 |
|
1904 | itemTpl?: string;
|
1905 | |
1906 |
|
1907 |
|
1908 |
|
1909 | domStyles?: TooltipDomStyles;
|
1910 | |
1911 |
|
1912 |
|
1913 | offset?: number;
|
1914 | |
1915 |
|
1916 |
|
1917 | reversed?: boolean;
|
1918 | |
1919 |
|
1920 |
|
1921 | showNil?: boolean;
|
1922 | |
1923 |
|
1924 |
|
1925 | customItems?: (originalItems: TooltipItem[]) => TooltipItem[];
|
1926 | |
1927 |
|
1928 |
|
1929 | customContent?: (title: string, data: any[]) => string | HTMLElement;
|
1930 | }
|
1931 |
|
1932 |
|
1933 |
|
1934 |
|
1935 | export interface CoordinateOption {
|
1936 | |
1937 |
|
1938 |
|
1939 | type?: 'polar' | 'theta' | 'rect' | 'cartesian' | 'helix';
|
1940 | |
1941 |
|
1942 |
|
1943 | cfg?: CoordinateCfg;
|
1944 | |
1945 |
|
1946 |
|
1947 |
|
1948 |
|
1949 |
|
1950 |
|
1951 |
|
1952 | actions?: CoordinateActions[];
|
1953 | }
|
1954 |
|
1955 |
|
1956 |
|
1957 |
|
1958 | export interface CoordinateCfg {
|
1959 | |
1960 |
|
1961 |
|
1962 |
|
1963 | startAngle?: number;
|
1964 | |
1965 |
|
1966 |
|
1967 |
|
1968 | endAngle?: number;
|
1969 | |
1970 |
|
1971 |
|
1972 |
|
1973 | radius?: number;
|
1974 | |
1975 |
|
1976 |
|
1977 |
|
1978 | innerRadius?: number;
|
1979 | }
|
1980 |
|
1981 |
|
1982 |
|
1983 |
|
1984 | export interface AxisGridCfg {
|
1985 | |
1986 |
|
1987 |
|
1988 |
|
1989 |
|
1990 |
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 |
|
1999 | line?: GridLineCfg;
|
2000 | |
2001 |
|
2002 |
|
2003 | alternateColor?: string | string[];
|
2004 | |
2005 |
|
2006 |
|
2007 |
|
2008 | closed?: boolean;
|
2009 | |
2010 |
|
2011 |
|
2012 |
|
2013 |
|
2014 | alignTick?: boolean;
|
2015 | }
|
2016 |
|
2017 |
|
2018 |
|
2019 |
|
2020 | export interface AxisCfg {
|
2021 | |
2022 |
|
2023 |
|
2024 |
|
2025 | top?: boolean;
|
2026 | |
2027 |
|
2028 |
|
2029 |
|
2030 | position?: 'top' | 'bottom' | 'right' | 'left';
|
2031 | |
2032 |
|
2033 |
|
2034 |
|
2035 |
|
2036 |
|
2037 |
|
2038 |
|
2039 |
|
2040 |
|
2041 |
|
2042 |
|
2043 |
|
2044 |
|
2045 | line?: AxisLineCfg | null;
|
2046 | |
2047 |
|
2048 |
|
2049 |
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 |
|
2059 |
|
2060 |
|
2061 |
|
2062 | tickLine?: AxisTickLineCfg | null;
|
2063 | |
2064 |
|
2065 |
|
2066 |
|
2067 |
|
2068 |
|
2069 |
|
2070 |
|
2071 |
|
2072 |
|
2073 |
|
2074 |
|
2075 |
|
2076 |
|
2077 |
|
2078 |
|
2079 | subTickLine?: AxisSubTickLineCfg | null;
|
2080 | |
2081 |
|
2082 |
|
2083 |
|
2084 |
|
2085 |
|
2086 |
|
2087 |
|
2088 |
|
2089 |
|
2090 |
|
2091 |
|
2092 |
|
2093 |
|
2094 |
|
2095 |
|
2096 | title?: AxisTitleCfg | null;
|
2097 | |
2098 |
|
2099 |
|
2100 |
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 |
|
2106 |
|
2107 |
|
2108 |
|
2109 |
|
2110 |
|
2111 |
|
2112 |
|
2113 |
|
2114 |
|
2115 |
|
2116 |
|
2117 |
|
2118 |
|
2119 |
|
2120 |
|
2121 |
|
2122 |
|
2123 |
|
2124 | label?: AxisLabelCfg | null;
|
2125 | |
2126 |
|
2127 |
|
2128 |
|
2129 | grid?: AxisGridCfg | null;
|
2130 | |
2131 |
|
2132 |
|
2133 |
|
2134 | animate?: boolean;
|
2135 | |
2136 |
|
2137 |
|
2138 | animateOption?: ComponentAnimateOption;
|
2139 | |
2140 |
|
2141 |
|
2142 |
|
2143 | verticalFactor?: number;
|
2144 | |
2145 |
|
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 |
|
2153 | verticalLimitLength?: number;
|
2154 | }
|
2155 |
|
2156 | export interface SliderCfg {
|
2157 | |
2158 |
|
2159 |
|
2160 | readonly height?: number;
|
2161 |
|
2162 | |
2163 |
|
2164 |
|
2165 | readonly trendCfg?: Omit<TrendCfg, 'data'> & { data?: number[] };
|
2166 | |
2167 |
|
2168 |
|
2169 | readonly backgroundStyle?: any;
|
2170 | |
2171 |
|
2172 |
|
2173 | readonly foregroundStyle?: any;
|
2174 | |
2175 |
|
2176 |
|
2177 | readonly handlerStyle?: any;
|
2178 | |
2179 |
|
2180 |
|
2181 | readonly textStyle?: any;
|
2182 | |
2183 |
|
2184 |
|
2185 | readonly minLimit?: number;
|
2186 | |
2187 |
|
2188 |
|
2189 | readonly maxLimit?: number;
|
2190 | |
2191 |
|
2192 |
|
2193 | readonly start?: number;
|
2194 | |
2195 |
|
2196 |
|
2197 | readonly end?: number;
|
2198 | |
2199 |
|
2200 |
|
2201 | readonly padding?: number[];
|
2202 | |
2203 |
|
2204 |
|
2205 | formatter?: (val: any, datum: Datum, idx: number) => any;
|
2206 | }
|
2207 |
|
2208 |
|
2209 |
|
2210 |
|
2211 | export type EventPayload = LooseObject & {
|
2212 | |
2213 |
|
2214 |
|
2215 | source?: string;
|
2216 | };
|
2217 |
|
2218 | export type EventCallback = (event: LooseObject) => void;
|
2219 |
|
2220 |
|
2221 |
|
2222 |
|
2223 | export interface EventCfg {
|
2224 | [key: string]: EventCallback;
|
2225 | }
|
2226 |
|
2227 |
|
2228 |
|
2229 |
|
2230 | export type SliderOption = SliderCfg | boolean;
|
2231 |
|
2232 |
|
2233 |
|
2234 |
|
2235 | export interface ScrollbarCfg {
|
2236 | |
2237 |
|
2238 |
|
2239 | type?: 'horizontal' | 'vertical';
|
2240 | |
2241 |
|
2242 |
|
2243 | width?: number;
|
2244 | |
2245 |
|
2246 |
|
2247 | height?: number;
|
2248 | |
2249 |
|
2250 |
|
2251 | padding?: Padding;
|
2252 | |
2253 |
|
2254 |
|
2255 | categorySize?: number;
|
2256 | |
2257 |
|
2258 |
|
2259 | animate?: boolean;
|
2260 | |
2261 |
|
2262 |
|
2263 | style?: {
|
2264 | |
2265 |
|
2266 |
|
2267 | trackColor?: string;
|
2268 | |
2269 |
|
2270 |
|
2271 | thumbColor?: string;
|
2272 | |
2273 |
|
2274 |
|
2275 | thumbHighlightColor?: string;
|
2276 | |
2277 |
|
2278 |
|
2279 | lineCap?: string;
|
2280 | };
|
2281 | }
|
2282 |
|
2283 |
|
2284 |
|
2285 |
|
2286 | export type ScrollbarOption = ScrollbarCfg | boolean;
|
2287 |
|
2288 |
|
2289 |
|
2290 |
|
2291 | export interface Options {
|
2292 | |
2293 |
|
2294 |
|
2295 | readonly data?: Data;
|
2296 | |
2297 |
|
2298 |
|
2299 | readonly filters?: Record<string, FilterCondition>;
|
2300 | |
2301 |
|
2302 |
|
2303 | readonly axes?: Record<string, AxisOption> | boolean;
|
2304 | |
2305 |
|
2306 |
|
2307 | readonly legends?: AllLegendsOptions;
|
2308 | |
2309 |
|
2310 |
|
2311 | readonly scales?: Record<string, ScaleOption>;
|
2312 | |
2313 |
|
2314 |
|
2315 | readonly tooltip?: TooltipOption;
|
2316 | |
2317 |
|
2318 |
|
2319 | readonly coordinate?: CoordinateOption;
|
2320 | |
2321 |
|
2322 |
|
2323 | readonly annotations?: (
|
2324 | | ArcOption
|
2325 | | RegionFilterOption
|
2326 | | ImageOption
|
2327 | | LineOption
|
2328 | | TextOption
|
2329 | | RegionOption
|
2330 | | DataMarkerOption
|
2331 | | DataRegionOption
|
2332 | )[];
|
2333 | |
2334 |
|
2335 |
|
2336 | readonly geometries?: GeometryOption[];
|
2337 | |
2338 |
|
2339 |
|
2340 | readonly animate?: boolean;
|
2341 | |
2342 |
|
2343 |
|
2344 | readonly interactions?: InteractionOption[];
|
2345 | |
2346 |
|
2347 |
|
2348 | readonly events?: EventCfg;
|
2349 |
|
2350 | |
2351 |
|
2352 |
|
2353 | readonly slider?: SliderOption;
|
2354 |
|
2355 | |
2356 |
|
2357 |
|
2358 | readonly scrollbar?: ScrollbarOption;
|
2359 |
|
2360 | |
2361 |
|
2362 |
|
2363 | readonly views?: ViewOption[];
|
2364 |
|
2365 | |
2366 |
|
2367 |
|
2368 | readonly facets?: (RectCfg | MirrorCfg | CircleCfg | ListCfg | TreeCfg)[];
|
2369 |
|
2370 | |
2371 |
|
2372 |
|
2373 | readonly [name: string]: any;
|
2374 | }
|
2375 |
|
2376 |
|
2377 |
|
2378 |
|
2379 | export type Marker =
|
2380 | | 'circle'
|
2381 | | 'square'
|
2382 | | 'diamond'
|
2383 | | 'triangle'
|
2384 | | 'triangle-down'
|
2385 | | 'hexagon'
|
2386 | | 'bowtie'
|
2387 | | 'cross'
|
2388 | | 'tick'
|
2389 | | 'plus'
|
2390 | | 'hyphen'
|
2391 | | 'line';
|
2392 |
|
2393 |
|
2394 |
|
2395 | export type MarkerCallback = (x: number, y: number, r: number) => PathCommand[];
|
2396 |
|
2397 |
|
2398 |
|
2399 | export type TooltipOption = TooltipCfg | boolean;
|
2400 |
|
2401 | export type FilterCondition = (value: any, datum: Datum, idx?: number) => boolean;
|
2402 |
|
2403 |
|
2404 |
|
2405 | export type AxisOption = AxisCfg | boolean;
|
2406 |
|
2407 |
|
2408 |
|
2409 | export type LegendOption = LegendCfg | boolean;
|
2410 |
|
2411 |
|
2412 |
|
2413 | export type AllLegendsOptions = LegendCfg | Record<string, LegendOption> | boolean;
|
2414 |
|
2415 |
|
2416 |
|
2417 | export type ScaleType =
|
2418 | | 'linear'
|
2419 | | 'cat'
|
2420 | | 'category'
|
2421 | | 'identity'
|
2422 | | 'log'
|
2423 | | 'pow'
|
2424 | | 'time'
|
2425 | | 'timeCat'
|
2426 | | 'quantize'
|
2427 | | 'quantile';
|
2428 |
|
2429 | export type CoordinateRotate = ['rotate', number];
|
2430 | export type CoordinateReflect = ['reflect', 'x' | 'y'];
|
2431 | export type CoordinateScale = ['scale', number, number];
|
2432 | export type CoordinateTranspose = ['transpose'];
|
2433 |
|
2434 |
|
2435 |
|
2436 | export type CoordinateActions = CoordinateRotate | CoordinateReflect | CoordinateScale | CoordinateTranspose;
|
2437 |
|
2438 |
|
2439 |
|
2440 | export type FacetCtor = new (view: View, cfg: any) => Facet;
|
2441 |
|
2442 | export interface Condition {
|
2443 | readonly field: string;
|
2444 | readonly value: any;
|
2445 | readonly values: any[];
|
2446 | }
|
2447 |
|
2448 | export type FacetDataFilter = (data: Datum[]) => boolean;
|
2449 |
|
2450 |
|
2451 |
|
2452 |
|
2453 | export interface FacetCfg<D> {
|
2454 | |
2455 |
|
2456 |
|
2457 | readonly type?: string;
|
2458 | |
2459 |
|
2460 |
|
2461 | readonly eachView: (innerView: View, facet?: D) => any;
|
2462 | |
2463 |
|
2464 |
|
2465 | readonly spacing?: [number | string, number | string];
|
2466 | |
2467 |
|
2468 |
|
2469 | readonly padding?: ViewPadding;
|
2470 | |
2471 |
|
2472 |
|
2473 | readonly showTitle?: boolean;
|
2474 | |
2475 |
|
2476 |
|
2477 | readonly fields: string[];
|
2478 | }
|
2479 |
|
2480 |
|
2481 |
|
2482 |
|
2483 | export interface FacetTitle {
|
2484 | |
2485 |
|
2486 |
|
2487 | readonly offsetX?: number;
|
2488 | |
2489 |
|
2490 |
|
2491 | readonly offsetY?: number;
|
2492 | |
2493 |
|
2494 |
|
2495 | readonly style?: object;
|
2496 | |
2497 |
|
2498 |
|
2499 | readonly formatter?: (val: any) => any;
|
2500 | }
|
2501 |
|
2502 |
|
2503 |
|
2504 |
|
2505 | export interface FacetData {
|
2506 | |
2507 |
|
2508 |
|
2509 | readonly type: string;
|
2510 | |
2511 |
|
2512 |
|
2513 | readonly data: object[];
|
2514 | |
2515 |
|
2516 |
|
2517 | readonly region: Region;
|
2518 | |
2519 |
|
2520 |
|
2521 | readonly padding?: number;
|
2522 | |
2523 |
|
2524 |
|
2525 | view?: View;
|
2526 |
|
2527 |
|
2528 | |
2529 |
|
2530 |
|
2531 | readonly rowField: string;
|
2532 | |
2533 |
|
2534 |
|
2535 | readonly columnField: string;
|
2536 | |
2537 |
|
2538 |
|
2539 | readonly rowValue: string;
|
2540 | |
2541 |
|
2542 |
|
2543 | readonly columnValue: string;
|
2544 | |
2545 |
|
2546 |
|
2547 | readonly rowIndex: number;
|
2548 | |
2549 |
|
2550 |
|
2551 | readonly columnIndex: number;
|
2552 | |
2553 |
|
2554 |
|
2555 | readonly rowValuesLength: number;
|
2556 | |
2557 |
|
2558 |
|
2559 | readonly columnValuesLength: number;
|
2560 | }
|
2561 |
|
2562 |
|
2563 |
|
2564 |
|
2565 |
|
2566 | export interface RectCfg extends FacetCfg<RectData> {
|
2567 | |
2568 |
|
2569 |
|
2570 | readonly columnTitle?: FacetTitle;
|
2571 | |
2572 |
|
2573 |
|
2574 | readonly rowTitle?: FacetTitle;
|
2575 | }
|
2576 |
|
2577 | export type RectData = FacetData;
|
2578 |
|
2579 |
|
2580 |
|
2581 |
|
2582 |
|
2583 | export interface MirrorCfg extends FacetCfg<MirrorData> {
|
2584 | |
2585 |
|
2586 |
|
2587 | readonly transpose?: boolean;
|
2588 | |
2589 |
|
2590 |
|
2591 | readonly title?: FacetTitle;
|
2592 | }
|
2593 |
|
2594 | export type MirrorData = FacetData;
|
2595 |
|
2596 |
|
2597 |
|
2598 |
|
2599 |
|
2600 | export interface ListCfg extends FacetCfg<ListData> {
|
2601 | |
2602 |
|
2603 |
|
2604 | readonly cols?: number;
|
2605 | |
2606 |
|
2607 |
|
2608 | readonly title?: FacetTitle;
|
2609 | }
|
2610 |
|
2611 | export interface ListData extends FacetData {
|
2612 | readonly total?: number;
|
2613 | }
|
2614 |
|
2615 |
|
2616 |
|
2617 |
|
2618 |
|
2619 | export interface MatrixCfg extends FacetCfg<MirrorData> {
|
2620 | |
2621 |
|
2622 |
|
2623 | readonly columnTitle?: FacetTitle;
|
2624 | |
2625 |
|
2626 |
|
2627 | readonly rowTitle?: FacetTitle;
|
2628 | }
|
2629 |
|
2630 | export type MatrixData = FacetData;
|
2631 |
|
2632 |
|
2633 |
|
2634 |
|
2635 |
|
2636 | export interface CircleCfg extends FacetCfg<CircleData> {
|
2637 | |
2638 |
|
2639 |
|
2640 | readonly title?: FacetTitle;
|
2641 | }
|
2642 |
|
2643 | export type CircleData = FacetData;
|
2644 |
|
2645 |
|
2646 |
|
2647 | export interface Line {
|
2648 | readonly style?: ShapeAttrs;
|
2649 | readonly smooth?: boolean;
|
2650 | }
|
2651 |
|
2652 |
|
2653 |
|
2654 | export interface TreeCfg extends FacetCfg<TreeData> {
|
2655 | readonly line?: Line;
|
2656 | readonly title?: FacetTitle;
|
2657 | }
|
2658 |
|
2659 | export interface TreeData extends FacetData {
|
2660 | children?: TreeData[];
|
2661 | originColIndex?: number;
|
2662 | }
|
2663 |
|
2664 |
|
2665 |
|
2666 |
|
2667 | export interface FacetCfgMap {
|
2668 | |
2669 |
|
2670 |
|
2671 | readonly rect: RectCfg;
|
2672 | |
2673 |
|
2674 |
|
2675 | readonly mirror: MirrorCfg;
|
2676 | |
2677 |
|
2678 |
|
2679 | readonly list: ListCfg;
|
2680 | |
2681 |
|
2682 |
|
2683 | readonly matrix: MatrixCfg;
|
2684 | |
2685 |
|
2686 |
|
2687 | readonly circle: CircleCfg;
|
2688 | |
2689 |
|
2690 |
|
2691 | readonly tree: TreeCfg;
|
2692 | }
|
2693 |
|
2694 |
|
2695 | export interface StyleSheet {
|
2696 | |
2697 |
|
2698 |
|
2699 | backgroundColor?: string;
|
2700 | |
2701 |
|
2702 |
|
2703 | brandColor?: string;
|
2704 | |
2705 |
|
2706 |
|
2707 | subColor?: string;
|
2708 | |
2709 |
|
2710 |
|
2711 | paletteQualitative10?: string[];
|
2712 | |
2713 |
|
2714 |
|
2715 | paletteQualitative20?: string[];
|
2716 | |
2717 |
|
2718 |
|
2719 | paletteSemanticRed?: string;
|
2720 | |
2721 |
|
2722 |
|
2723 | paletteSemanticGreen?: string;
|
2724 | |
2725 |
|
2726 |
|
2727 | paletteSemanticYellow?: string;
|
2728 | |
2729 |
|
2730 |
|
2731 | paletteSequence?: string[];
|
2732 | |
2733 |
|
2734 |
|
2735 | fontFamily?: string;
|
2736 |
|
2737 |
|
2738 | |
2739 |
|
2740 |
|
2741 | axisLineBorderColor?: string;
|
2742 | |
2743 |
|
2744 |
|
2745 | axisLineBorder?: number;
|
2746 | |
2747 |
|
2748 |
|
2749 | axisLineDash?: number[];
|
2750 |
|
2751 | |
2752 |
|
2753 |
|
2754 | axisTitleTextFillColor?: string;
|
2755 | |
2756 |
|
2757 |
|
2758 | axisTitleTextFontSize?: number;
|
2759 | |
2760 |
|
2761 |
|
2762 | axisTitleTextLineHeight?: number;
|
2763 | |
2764 |
|
2765 |
|
2766 | axisTitleTextFontWeight?: number | string;
|
2767 | |
2768 |
|
2769 |
|
2770 | axisTitleSpacing?: number;
|
2771 | |
2772 |
|
2773 |
|
2774 | axisDescriptionIconFillColor?: string;
|
2775 | |
2776 |
|
2777 |
|
2778 | axisTickLineBorderColor?: string;
|
2779 | |
2780 |
|
2781 |
|
2782 | axisTickLineLength?: number;
|
2783 | |
2784 |
|
2785 |
|
2786 | axisTickLineBorder?: number;
|
2787 |
|
2788 | |
2789 |
|
2790 |
|
2791 | axisSubTickLineBorderColor?: string;
|
2792 | |
2793 |
|
2794 |
|
2795 | axisSubTickLineLength?: number;
|
2796 | |
2797 |
|
2798 |
|
2799 | axisSubTickLineBorder?: number;
|
2800 |
|
2801 | |
2802 |
|
2803 |
|
2804 | axisLabelFillColor?: string;
|
2805 | |
2806 |
|
2807 |
|
2808 | axisLabelFontSize?: number;
|
2809 | |
2810 |
|
2811 |
|
2812 | axisLabelLineHeight?: number;
|
2813 | |
2814 |
|
2815 |
|
2816 | axisLabelFontWeight?: number | string;
|
2817 | |
2818 |
|
2819 |
|
2820 | axisLabelOffset: number;
|
2821 |
|
2822 | |
2823 |
|
2824 |
|
2825 | axisGridBorderColor?: string;
|
2826 | |
2827 |
|
2828 |
|
2829 | axisGridBorder?: number;
|
2830 | |
2831 |
|
2832 |
|
2833 | axisGridLineDash?: number[];
|
2834 |
|
2835 |
|
2836 | |
2837 |
|
2838 |
|
2839 | legendTitleTextFillColor?: string;
|
2840 | |
2841 |
|
2842 |
|
2843 | legendTitleTextFontSize?: number;
|
2844 | |
2845 |
|
2846 |
|
2847 | legendTitleTextLineHeight?: number;
|
2848 | |
2849 |
|
2850 |
|
2851 | legendTitleTextFontWeight?: number | string;
|
2852 |
|
2853 | |
2854 |
|
2855 |
|
2856 | legendMarkerColor?: string;
|
2857 | |
2858 |
|
2859 |
|
2860 | legendMarkerSpacing?: number;
|
2861 | |
2862 |
|
2863 |
|
2864 | legendMarkerSize?: number;
|
2865 | |
2866 |
|
2867 |
|
2868 | legendCircleMarkerSize?: number;
|
2869 | |
2870 |
|
2871 |
|
2872 | legendSquareMarkerSize?: number;
|
2873 | |
2874 |
|
2875 |
|
2876 | legendLineMarkerSize?: number;
|
2877 |
|
2878 | |
2879 |
|
2880 |
|
2881 | legendItemNameFillColor?: string;
|
2882 | |
2883 |
|
2884 |
|
2885 | legendItemNameFontSize?: number;
|
2886 | |
2887 |
|
2888 |
|
2889 | legendItemNameLineHeight?: number;
|
2890 | |
2891 |
|
2892 |
|
2893 | legendItemNameFontWeight?: number | string;
|
2894 | |
2895 |
|
2896 |
|
2897 | legendItemSpacing?: number;
|
2898 | |
2899 |
|
2900 |
|
2901 | legendItemMarginBottom?: number;
|
2902 | |
2903 |
|
2904 |
|
2905 | legendPadding?: number[];
|
2906 | |
2907 |
|
2908 |
|
2909 | legendHorizontalPadding?: number[];
|
2910 | |
2911 |
|
2912 |
|
2913 | legendVerticalPadding?: number[];
|
2914 |
|
2915 | |
2916 |
|
2917 |
|
2918 | legendPageNavigatorMarkerSize: number;
|
2919 | |
2920 |
|
2921 |
|
2922 | legendPageNavigatorMarkerInactiveFillColor: string;
|
2923 | |
2924 |
|
2925 |
|
2926 | legendPageNavigatorMarkerInactiveFillOpacity: number;
|
2927 | |
2928 |
|
2929 |
|
2930 | legendPageNavigatorMarkerFillColor: string;
|
2931 | |
2932 |
|
2933 |
|
2934 | legendPageNavigatorMarkerFillOpacity: number;
|
2935 | |
2936 |
|
2937 |
|
2938 | legendPageNavigatorTextFillColor: string;
|
2939 | |
2940 |
|
2941 |
|
2942 | legendPageNavigatorTextFontSize: number;
|
2943 |
|
2944 | |
2945 |
|
2946 |
|
2947 | sliderRailFillColor?: string;
|
2948 | |
2949 |
|
2950 |
|
2951 | sliderRailBorder?: number;
|
2952 | |
2953 |
|
2954 |
|
2955 | sliderRailBorderColor?: string;
|
2956 | |
2957 |
|
2958 |
|
2959 | sliderRailWidth?: number;
|
2960 | |
2961 |
|
2962 |
|
2963 | sliderRailHeight?: number;
|
2964 |
|
2965 | |
2966 |
|
2967 |
|
2968 | sliderLabelTextFillColor?: string;
|
2969 | |
2970 |
|
2971 |
|
2972 | sliderLabelTextFontSize?: number;
|
2973 | |
2974 |
|
2975 |
|
2976 | sliderLabelTextLineHeight?: number;
|
2977 | |
2978 |
|
2979 |
|
2980 | sliderLabelTextFontWeight?: number | string;
|
2981 |
|
2982 | |
2983 |
|
2984 |
|
2985 | sliderHandlerFillColor?: string;
|
2986 | |
2987 |
|
2988 |
|
2989 | sliderHandlerWidth?: number;
|
2990 | |
2991 |
|
2992 |
|
2993 | sliderHandlerHeight?: number;
|
2994 | |
2995 |
|
2996 |
|
2997 | sliderHandlerBorder?: number;
|
2998 | |
2999 |
|
3000 |
|
3001 | sliderHandlerBorderColor?: string;
|
3002 |
|
3003 |
|
3004 | |
3005 |
|
3006 |
|
3007 | annotationArcBorderColor?: string;
|
3008 | |
3009 |
|
3010 |
|
3011 | annotationArcBorder?: number;
|
3012 |
|
3013 | |
3014 |
|
3015 |
|
3016 | annotationLineBorderColor?: string;
|
3017 | |
3018 |
|
3019 |
|
3020 | annotationLineBorder?: number;
|
3021 | |
3022 |
|
3023 |
|
3024 | annotationLineDash?: number[];
|
3025 |
|
3026 | |
3027 |
|
3028 |
|
3029 | annotationTextFillColor?: string;
|
3030 | |
3031 |
|
3032 |
|
3033 | annotationTextFontSize?: number;
|
3034 | |
3035 |
|
3036 |
|
3037 | annotationTextLineHeight?: number;
|
3038 | |
3039 |
|
3040 |
|
3041 | annotationTextFontWeight?: number | string;
|
3042 |
|
3043 | |
3044 |
|
3045 |
|
3046 | annotationTextBorderColor?: string;
|
3047 | |
3048 |
|
3049 |
|
3050 | annotationTextBorder?: number;
|
3051 |
|
3052 | |
3053 |
|
3054 |
|
3055 | annotationRegionFillColor?: string;
|
3056 | |
3057 |
|
3058 |
|
3059 | annotationRegionFillOpacity?: number;
|
3060 | |
3061 |
|
3062 |
|
3063 | annotationRegionBorder?: number;
|
3064 | |
3065 |
|
3066 |
|
3067 | annotationRegionBorderColor?: string;
|
3068 |
|
3069 | |
3070 |
|
3071 |
|
3072 | annotationDataMarkerLineLength?: number;
|
3073 |
|
3074 |
|
3075 | |
3076 |
|
3077 |
|
3078 | tooltipCrosshairsBorderColor?: string;
|
3079 | |
3080 |
|
3081 |
|
3082 | tooltipCrosshairsBorder?: number;
|
3083 | |
3084 |
|
3085 |
|
3086 | tooltipCrosshairsLineDash?: number[];
|
3087 |
|
3088 | |
3089 |
|
3090 |
|
3091 | tooltipContainerFillColor?: string;
|
3092 | |
3093 |
|
3094 |
|
3095 | tooltipContainerFillOpacity?: number;
|
3096 | |
3097 |
|
3098 |
|
3099 | tooltipContainerShadow?: string;
|
3100 | |
3101 |
|
3102 |
|
3103 | tooltipContainerBorderRadius?: number;
|
3104 |
|
3105 | |
3106 |
|
3107 |
|
3108 | tooltipTextFillColor?: string;
|
3109 | |
3110 |
|
3111 |
|
3112 | tooltipTextFontSize?: number;
|
3113 | |
3114 |
|
3115 |
|
3116 | tooltipTextLineHeight?: number;
|
3117 | |
3118 |
|
3119 |
|
3120 | tooltipTextFontWeight?: number | string;
|
3121 |
|
3122 |
|
3123 | |
3124 |
|
3125 |
|
3126 | labelFillColor?: string;
|
3127 | |
3128 |
|
3129 |
|
3130 | labelFillColorDark?: string;
|
3131 | |
3132 |
|
3133 |
|
3134 | labelFillColorLight?: string;
|
3135 | |
3136 |
|
3137 |
|
3138 | labelFontSize?: number;
|
3139 | |
3140 |
|
3141 |
|
3142 | labelLineHeight?: number;
|
3143 | |
3144 |
|
3145 |
|
3146 | labelFontWeight?: number | string;
|
3147 | |
3148 |
|
3149 |
|
3150 | labelBorderColor?: string;
|
3151 | |
3152 |
|
3153 |
|
3154 | labelBorder?: number;
|
3155 |
|
3156 | |
3157 |
|
3158 |
|
3159 | innerLabelFillColor?: string;
|
3160 | |
3161 |
|
3162 |
|
3163 | innerLabelFontSize?: number;
|
3164 | |
3165 |
|
3166 |
|
3167 | innerLabelLineHeight?: number;
|
3168 | |
3169 |
|
3170 |
|
3171 | innerLabelFontWeight?: number | string;
|
3172 | |
3173 |
|
3174 |
|
3175 | innerLabelBorderColor?: string;
|
3176 | |
3177 |
|
3178 |
|
3179 | innerLabelBorder?: number;
|
3180 |
|
3181 | |
3182 |
|
3183 |
|
3184 | overflowLabelFillColor?: string;
|
3185 | |
3186 |
|
3187 |
|
3188 | overflowLabelFillColorDark?: string;
|
3189 | |
3190 |
|
3191 |
|
3192 | overflowLabelFillColorLight?: string;
|
3193 | |
3194 |
|
3195 |
|
3196 | overflowLabelFontSize?: number;
|
3197 | |
3198 |
|
3199 |
|
3200 | overflowLabelLineHeight?: number;
|
3201 | |
3202 |
|
3203 |
|
3204 | overflowLabelFontWeight?: number | string;
|
3205 | |
3206 |
|
3207 |
|
3208 | overflowLabelBorderColor?: string;
|
3209 | |
3210 |
|
3211 |
|
3212 | overflowLabelBorder?: number;
|
3213 |
|
3214 | |
3215 |
|
3216 |
|
3217 | labelLineBorder?: number;
|
3218 | |
3219 |
|
3220 |
|
3221 | labelLineBorderColor?: string;
|
3222 |
|
3223 |
|
3224 | |
3225 |
|
3226 |
|
3227 | cSliderRailHieght?: number;
|
3228 | |
3229 |
|
3230 |
|
3231 | cSliderBackgroundFillColor?: string;
|
3232 | |
3233 |
|
3234 |
|
3235 | cSliderBackgroundFillOpacity?: number;
|
3236 | |
3237 |
|
3238 |
|
3239 | cSliderForegroundFillColor?: string;
|
3240 | |
3241 |
|
3242 |
|
3243 | cSliderForegroundFillOpacity?: number;
|
3244 |
|
3245 |
|
3246 | |
3247 |
|
3248 |
|
3249 | cSliderHandlerHeight?: number;
|
3250 | |
3251 |
|
3252 |
|
3253 | cSliderHandlerWidth?: number;
|
3254 | |
3255 |
|
3256 |
|
3257 | cSliderHandlerFillColor?: string;
|
3258 | |
3259 |
|
3260 |
|
3261 | cSliderHandlerFillOpacity?: number;
|
3262 | |
3263 |
|
3264 |
|
3265 | cSliderHandlerHighlightFillColor?: string;
|
3266 | |
3267 |
|
3268 |
|
3269 | cSliderHandlerBorderColor?: string;
|
3270 | |
3271 |
|
3272 |
|
3273 | cSliderHandlerBorder?: number;
|
3274 | |
3275 |
|
3276 |
|
3277 | cSliderHandlerBorderRadius?: number;
|
3278 |
|
3279 |
|
3280 | |
3281 |
|
3282 |
|
3283 | cSliderTextFillColor?: string;
|
3284 | |
3285 |
|
3286 |
|
3287 | cSliderTextFillOpacity?: number;
|
3288 | |
3289 |
|
3290 |
|
3291 | cSliderTextFontSize?: number;
|
3292 | |
3293 |
|
3294 |
|
3295 | cSliderTextLineHeight?: number;
|
3296 | |
3297 |
|
3298 |
|
3299 | cSliderTextFontWeight?: number | string;
|
3300 | |
3301 |
|
3302 |
|
3303 | cSliderTextBorderColor?: string;
|
3304 | |
3305 |
|
3306 |
|
3307 | cSliderTextBorder?: number;
|
3308 |
|
3309 |
|
3310 | |
3311 |
|
3312 |
|
3313 | scrollbarTrackFillColor?: string;
|
3314 | |
3315 |
|
3316 |
|
3317 | scrollbarThumbFillColor?: string;
|
3318 | |
3319 |
|
3320 |
|
3321 | scrollbarThumbHighlightFillColor?: string;
|
3322 |
|
3323 |
|
3324 | |
3325 |
|
3326 |
|
3327 | pointSizeRange?: [number, number];
|
3328 | |
3329 |
|
3330 |
|
3331 | pointFillColor?: string;
|
3332 | |
3333 |
|
3334 |
|
3335 | pointFillOpacity?: number;
|
3336 | |
3337 |
|
3338 |
|
3339 | pointSize?: number;
|
3340 | |
3341 |
|
3342 |
|
3343 | pointBorder?: number;
|
3344 | |
3345 |
|
3346 |
|
3347 | pointBorderColor?: string;
|
3348 | |
3349 |
|
3350 |
|
3351 | pointBorderOpacity?: number;
|
3352 |
|
3353 | |
3354 |
|
3355 |
|
3356 | pointActiveFillColor?: string;
|
3357 | |
3358 |
|
3359 |
|
3360 | pointActiveFillOpacity?: number;
|
3361 | |
3362 |
|
3363 |
|
3364 | pointActiveSize?: number;
|
3365 | |
3366 |
|
3367 |
|
3368 | pointActiveBorder?: number;
|
3369 | |
3370 |
|
3371 |
|
3372 | pointActiveBorderColor?: string;
|
3373 | |
3374 |
|
3375 |
|
3376 | pointActiveBorderOpacity?: number;
|
3377 |
|
3378 | |
3379 |
|
3380 |
|
3381 | pointSelectedFillColor?: string;
|
3382 | |
3383 |
|
3384 |
|
3385 | pointSelectedFillOpacity?: number;
|
3386 | |
3387 |
|
3388 |
|
3389 | pointSelectedSize?: number;
|
3390 | |
3391 |
|
3392 |
|
3393 | pointSelectedBorder?: number;
|
3394 | |
3395 |
|
3396 |
|
3397 | pointSelectedBorderColor?: string;
|
3398 | |
3399 |
|
3400 |
|
3401 | pointSelectedBorderOpacity?: number;
|
3402 |
|
3403 | |
3404 |
|
3405 |
|
3406 | pointInactiveFillColor?: string;
|
3407 | |
3408 |
|
3409 |
|
3410 | pointInactiveFillOpacity?: number;
|
3411 | |
3412 |
|
3413 |
|
3414 | pointInactiveSize?: number;
|
3415 | |
3416 |
|
3417 |
|
3418 | pointInactiveBorder?: number;
|
3419 | |
3420 |
|
3421 |
|
3422 | pointInactiveBorderColor?: string;
|
3423 | |
3424 |
|
3425 |
|
3426 | pointInactiveBorderOpacity?: number;
|
3427 |
|
3428 | |
3429 |
|
3430 |
|
3431 | hollowPointSize?: number;
|
3432 | |
3433 |
|
3434 |
|
3435 | hollowPointBorder?: number;
|
3436 | |
3437 |
|
3438 |
|
3439 | hollowPointBorderColor?: string;
|
3440 | |
3441 |
|
3442 |
|
3443 | hollowPointBorderOpacity?: number;
|
3444 | |
3445 |
|
3446 |
|
3447 | hollowPointFillColor?: string;
|
3448 | |
3449 |
|
3450 |
|
3451 | hollowPointFillOpacity?: number;
|
3452 |
|
3453 | |
3454 |
|
3455 |
|
3456 | hollowPointActiveSize?: number;
|
3457 | |
3458 |
|
3459 |
|
3460 | hollowPointActiveBorder?: number;
|
3461 | |
3462 |
|
3463 |
|
3464 | hollowPointActiveBorderColor?: string;
|
3465 | |
3466 |
|
3467 |
|
3468 | hollowPointActiveBorderOpacity?: number;
|
3469 |
|
3470 | |
3471 |
|
3472 |
|
3473 | hollowPointSelectedSize?: number;
|
3474 | |
3475 |
|
3476 |
|
3477 | hollowPointSelectedBorder?: number;
|
3478 | |
3479 |
|
3480 |
|
3481 | hollowPointSelectedBorderColor?: string;
|
3482 | |
3483 |
|
3484 |
|
3485 | hollowPointSelectedBorderOpacity?: number;
|
3486 |
|
3487 | |
3488 |
|
3489 |
|
3490 | hollowPointInactiveSize?: number;
|
3491 | |
3492 |
|
3493 |
|
3494 | hollowPointInactiveBorder?: number;
|
3495 | |
3496 |
|
3497 |
|
3498 | hollowPointInactiveBorderColor?: string;
|
3499 | |
3500 |
|
3501 |
|
3502 | hollowPointInactiveBorderOpacity?: number;
|
3503 |
|
3504 | |
3505 |
|
3506 |
|
3507 | lineBorder?: number;
|
3508 | |
3509 |
|
3510 |
|
3511 | lineBorderColor?: string;
|
3512 | |
3513 |
|
3514 |
|
3515 | lineBorderOpacity?: number;
|
3516 |
|
3517 | |
3518 |
|
3519 |
|
3520 | lineActiveBorder?: number;
|
3521 | |
3522 |
|
3523 |
|
3524 | lineActiveBorderColor?: string;
|
3525 | |
3526 |
|
3527 |
|
3528 | lineActiveBorderOpacity?: number;
|
3529 |
|
3530 | |
3531 |
|
3532 |
|
3533 | lineSelectedBorder?: number;
|
3534 | |
3535 |
|
3536 |
|
3537 | lineSelectedBorderColor?: string;
|
3538 | |
3539 |
|
3540 |
|
3541 | lineSelectedBorderOpacity?: number;
|
3542 |
|
3543 | |
3544 |
|
3545 |
|
3546 | lineInactiveBorder?: number;
|
3547 | |
3548 |
|
3549 |
|
3550 | lineInactiveBorderColor?: string;
|
3551 | |
3552 |
|
3553 |
|
3554 | lineInactiveBorderOpacity?: number;
|
3555 |
|
3556 | areaBorder?: number;
|
3557 | |
3558 |
|
3559 |
|
3560 | areaBorderColor?: string;
|
3561 | |
3562 |
|
3563 |
|
3564 | areaBorderOpacity?: number;
|
3565 | |
3566 |
|
3567 |
|
3568 | areaFillColor?: string;
|
3569 | |
3570 |
|
3571 |
|
3572 | areaFillOpacity?: number;
|
3573 |
|
3574 | |
3575 |
|
3576 |
|
3577 | areaActiveBorder?: number;
|
3578 | |
3579 |
|
3580 |
|
3581 | areaActiveBorderColor?: string;
|
3582 | |
3583 |
|
3584 |
|
3585 | areaActiveBorderOpacity?: number;
|
3586 | |
3587 |
|
3588 |
|
3589 | areaActiveFillColor?: string;
|
3590 | |
3591 |
|
3592 |
|
3593 | areaActiveFillOpacity?: number;
|
3594 |
|
3595 | |
3596 |
|
3597 |
|
3598 | areaSelectedBorder?: number;
|
3599 | |
3600 |
|
3601 |
|
3602 | areaSelectedBorderColor?: string;
|
3603 | |
3604 |
|
3605 |
|
3606 | areaSelectedBorderOpacity?: number;
|
3607 | |
3608 |
|
3609 |
|
3610 | areaSelectedFillColor?: string;
|
3611 | |
3612 |
|
3613 |
|
3614 | areaSelectedFillOpacity?: number;
|
3615 |
|
3616 | |
3617 |
|
3618 |
|
3619 | areaInactiveBorder?: number;
|
3620 | |
3621 |
|
3622 |
|
3623 | areaInactiveBorderColor?: string;
|
3624 | |
3625 |
|
3626 |
|
3627 | areaInactiveBorderOpacity?: number;
|
3628 | |
3629 |
|
3630 |
|
3631 | areaInactiveFillColor?: string;
|
3632 | |
3633 |
|
3634 |
|
3635 | areaInactiveFillOpacity?: number;
|
3636 |
|
3637 | |
3638 |
|
3639 |
|
3640 | hollowAreaBorder?: number;
|
3641 | |
3642 |
|
3643 |
|
3644 | hollowAreaBorderColor?: string;
|
3645 | |
3646 |
|
3647 |
|
3648 | hollowAreaBorderOpacity?: number;
|
3649 |
|
3650 | |
3651 |
|
3652 |
|
3653 | hollowAreaActiveBorder?: number;
|
3654 | |
3655 |
|
3656 |
|
3657 | hollowAreaActiveBorderColor?: string;
|
3658 | |
3659 |
|
3660 |
|
3661 | hollowAreaActiveBorderOpacity?: number;
|
3662 |
|
3663 | |
3664 |
|
3665 |
|
3666 | hollowAreaSelectedBorder?: number;
|
3667 | |
3668 |
|
3669 |
|
3670 | hollowAreaSelectedBorderColor?: string;
|
3671 | |
3672 |
|
3673 |
|
3674 | hollowAreaSelectedBorderOpacity?: number;
|
3675 |
|
3676 | |
3677 |
|
3678 |
|
3679 | hollowAreaInactiveBorder?: number;
|
3680 | |
3681 |
|
3682 |
|
3683 | hollowAreaInactiveBorderColor?: string;
|
3684 | |
3685 |
|
3686 |
|
3687 | hollowAreaInactiveBorderOpacity?: number;
|
3688 |
|
3689 | |
3690 |
|
3691 |
|
3692 | intervalBorder?: number;
|
3693 | |
3694 |
|
3695 |
|
3696 | intervalBorderColor?: string;
|
3697 | |
3698 |
|
3699 |
|
3700 | intervalBorderOpacity?: number;
|
3701 | |
3702 |
|
3703 |
|
3704 | intervalFillColor?: string;
|
3705 | |
3706 |
|
3707 |
|
3708 | intervalFillOpacity?: number;
|
3709 |
|
3710 | |
3711 |
|
3712 |
|
3713 | intervalActiveBorder?: number;
|
3714 | |
3715 |
|
3716 |
|
3717 | intervalActiveBorderColor?: string;
|
3718 | |
3719 |
|
3720 |
|
3721 | intervalActiveBorderOpacity?: number;
|
3722 | |
3723 |
|
3724 |
|
3725 | intervalActiveFillColor?: string;
|
3726 | |
3727 |
|
3728 |
|
3729 | intervalActiveFillOpacity?: number;
|
3730 |
|
3731 | |
3732 |
|
3733 |
|
3734 | intervalSelectedBorder?: number;
|
3735 | |
3736 |
|
3737 |
|
3738 | intervalSelectedBorderColor?: string;
|
3739 | |
3740 |
|
3741 |
|
3742 | intervalSelectedBorderOpacity?: number;
|
3743 | |
3744 |
|
3745 |
|
3746 | intervalSelectedFillColor?: string;
|
3747 | |
3748 |
|
3749 |
|
3750 | intervalSelectedFillOpacity?: number;
|
3751 |
|
3752 | |
3753 |
|
3754 |
|
3755 | intervalInactiveBorder?: number;
|
3756 | |
3757 |
|
3758 |
|
3759 | intervalInactiveBorderColor?: string;
|
3760 | |
3761 |
|
3762 |
|
3763 | intervalInactiveBorderOpacity?: number;
|
3764 | |
3765 |
|
3766 |
|
3767 | intervalInactiveFillColor?: string;
|
3768 | |
3769 |
|
3770 |
|
3771 | intervalInactiveFillOpacity?: number;
|
3772 |
|
3773 | |
3774 |
|
3775 |
|
3776 | hollowIntervalBorder?: number;
|
3777 | |
3778 |
|
3779 |
|
3780 | hollowIntervalBorderColor?: string;
|
3781 | |
3782 |
|
3783 |
|
3784 | hollowIntervalBorderOpacity?: number;
|
3785 | |
3786 |
|
3787 |
|
3788 | hollowIntervalFillColor?: string;
|
3789 | |
3790 |
|
3791 |
|
3792 | hollowIntervalFillOpacity?: number;
|
3793 |
|
3794 | |
3795 |
|
3796 |
|
3797 | hollowIntervalActiveBorder?: number;
|
3798 | |
3799 |
|
3800 |
|
3801 | hollowIntervalActiveBorderColor?: string;
|
3802 | |
3803 |
|
3804 |
|
3805 | hollowIntervalActiveBorderOpacity?: number;
|
3806 |
|
3807 | |
3808 |
|
3809 |
|
3810 | hollowIntervalSelectedBorder?: number;
|
3811 | |
3812 |
|
3813 |
|
3814 | hollowIntervalSelectedBorderColor?: string;
|
3815 | |
3816 |
|
3817 |
|
3818 | hollowIntervalSelectedBorderOpacity?: number;
|
3819 |
|
3820 | |
3821 |
|
3822 |
|
3823 | hollowIntervalInactiveBorder?: number;
|
3824 | |
3825 |
|
3826 |
|
3827 | hollowIntervalInactiveBorderColor?: string;
|
3828 | |
3829 |
|
3830 |
|
3831 | hollowIntervalInactiveBorderOpacity?: number;
|
3832 | }
|
3833 |
|
3834 |
|
3835 |
|
3836 |
|
3837 | export type StyleSheetCfg = Partial<StyleSheet>;
|
3838 |
|
3839 |
|
3840 |
|
3841 |
|
3842 |
|
3843 | export interface IAction {
|
3844 | |
3845 |
|
3846 |
|
3847 | init();
|
3848 | |
3849 |
|
3850 |
|
3851 | name: string;
|
3852 | |
3853 |
|
3854 |
|
3855 | context: IInteractionContext;
|
3856 | |
3857 |
|
3858 |
|
3859 | destroy();
|
3860 | }
|
3861 |
|
3862 |
|
3863 |
|
3864 |
|
3865 | export interface IInteractionContext extends LooseObject {
|
3866 | |
3867 |
|
3868 |
|
3869 | event: LooseObject;
|
3870 | |
3871 |
|
3872 |
|
3873 | view: View;
|
3874 | |
3875 |
|
3876 |
|
3877 | actions: IAction[];
|
3878 | |
3879 |
|
3880 |
|
3881 |
|
3882 |
|
3883 | cache(key: string, value?: any);
|
3884 | |
3885 |
|
3886 |
|
3887 |
|
3888 |
|
3889 | getAction(name): IAction;
|
3890 | |
3891 |
|
3892 |
|
3893 |
|
3894 | getCurrentPoint(): Point;
|
3895 | |
3896 |
|
3897 |
|
3898 | getCurrentShape(): IShape;
|
3899 | |
3900 |
|
3901 |
|
3902 |
|
3903 | addAction(action: IAction);
|
3904 | |
3905 |
|
3906 |
|
3907 |
|
3908 | removeAction(action: IAction);
|
3909 | |
3910 |
|
3911 |
|
3912 | isInPlot();
|
3913 | |
3914 |
|
3915 |
|
3916 |
|
3917 | isInComponent(name?: string);
|
3918 | |
3919 |
|
3920 |
|
3921 |
|
3922 | isInShape(name);
|
3923 | |
3924 |
|
3925 |
|
3926 | destroy();
|
3927 | }
|
3928 |
|
3929 |
|
3930 |
|
3931 |
|
3932 | export type Renderer = 'svg' | 'canvas';
|
3933 |
|
3934 |
|
3935 |
|
3936 | export type Datum = Record<string, any>;
|
3937 | export type Data = Datum[];
|
3938 | export type ActionCallback = (context: IInteractionContext) => void;
|
3939 | export type Padding = [number, number, number, number];
|
3940 | export type ViewPadding = number | number[] | 'auto';
|
3941 | export type ViewAppendPadding = number | number[];
|
3942 | export type Position = [number, number];
|
3943 | export type AttributeType = 'position' | 'size' | 'color' | 'shape';
|
3944 | export type ShapeVertices = RangePoint[] | Point[] | Point[][];
|
3945 |
|
3946 |
|
3947 |
|
3948 | export type AnimateEasingCallback = (data: Datum) => string;
|
3949 |
|
3950 |
|
3951 |
|
3952 | export type AnimateDelayCallback = (data: Datum) => number;
|
3953 |
|
3954 |
|
3955 |
|
3956 | export type AnimateDurationCallback = (data: Datum) => number;
|
3957 |
|
\ | No newline at end of file |