1 | import { AnimateCfg, BBox, IGroup, IShape, Point, ShapeAttrs } from '@antv/g-base';
|
2 | export declare type LocationType = 'point' | 'Region' | 'points' | 'circle' | 'none';
|
3 | export { Point, BBox };
|
4 |
|
5 | declare type ShapeAttrsCallback = (item: any, index: number, items: any[]) => ShapeAttrs;
|
6 |
|
7 | export interface LooseObject {
|
8 | [key: string]: any;
|
9 | }
|
10 | export interface OffsetPoint {
|
11 | offsetX: number;
|
12 | offsetY: number;
|
13 | }
|
14 | export interface Region {
|
15 | |
16 |
|
17 |
|
18 |
|
19 | start: Point;
|
20 | |
21 |
|
22 |
|
23 |
|
24 | end: Point;
|
25 | }
|
26 | export interface Range {
|
27 | |
28 |
|
29 |
|
30 |
|
31 | min: number;
|
32 | |
33 |
|
34 |
|
35 |
|
36 | max: number;
|
37 | }
|
38 |
|
39 | export interface EnhancedTextBackgroundCfg {
|
40 |
|
41 | padding?: number | number[];
|
42 |
|
43 | style?: ShapeAttrs;
|
44 | }
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | export interface EnhancedTextCfg {
|
51 |
|
52 | content: string | number;
|
53 |
|
54 | rotate?: number;
|
55 |
|
56 | style?: ShapeAttrs;
|
57 |
|
58 | background?: EnhancedTextBackgroundCfg;
|
59 |
|
60 | maxLength?: number;
|
61 |
|
62 | autoEllipsis?: boolean;
|
63 |
|
64 | isVertical?: boolean;
|
65 |
|
66 | ellipsisPosition?: 'head' | 'middle' | 'tail';
|
67 | }
|
68 |
|
69 |
|
70 |
|
71 |
|
72 | export interface ListItem {
|
73 | |
74 |
|
75 |
|
76 |
|
77 | id?: string;
|
78 | |
79 |
|
80 |
|
81 |
|
82 | name: string;
|
83 | |
84 |
|
85 |
|
86 |
|
87 | value: any;
|
88 | |
89 |
|
90 |
|
91 |
|
92 | marker?: object | string;
|
93 | [key: string]: any;
|
94 | }
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | export interface GridItem {
|
100 | |
101 |
|
102 |
|
103 |
|
104 | id?: string;
|
105 | |
106 |
|
107 |
|
108 |
|
109 | points: Point[];
|
110 | [key: string]: any;
|
111 | }
|
112 |
|
113 |
|
114 |
|
115 |
|
116 | export interface AxisLineCfg {
|
117 | |
118 |
|
119 |
|
120 |
|
121 | style?: ShapeAttrs;
|
122 | }
|
123 |
|
124 |
|
125 |
|
126 |
|
127 | export interface AxisTickLineCfg {
|
128 | |
129 |
|
130 |
|
131 |
|
132 | style?: ShapeAttrs | ShapeAttrsCallback;
|
133 | |
134 |
|
135 |
|
136 |
|
137 | alignTick?: boolean;
|
138 | |
139 |
|
140 |
|
141 |
|
142 | length?: number;
|
143 | }
|
144 | declare type avoidCallback = (isVertical: boolean, labelGroup: IGroup, limitLength?: number) => boolean;
|
145 |
|
146 | export interface AxisLabelAutoHideCfg {
|
147 |
|
148 | minGap?: number;
|
149 | }
|
150 |
|
151 |
|
152 |
|
153 |
|
154 | export interface AxisLabelCfg {
|
155 | |
156 |
|
157 |
|
158 |
|
159 | style?: ShapeAttrs | ShapeAttrsCallback;
|
160 | |
161 |
|
162 |
|
163 |
|
164 | offset?: number;
|
165 | |
166 |
|
167 |
|
168 |
|
169 | rotate?: number;
|
170 | |
171 |
|
172 |
|
173 |
|
174 | formatter?: formatterCallback;
|
175 | |
176 |
|
177 |
|
178 |
|
179 | autoRotate?: boolean | avoidCallback | string;
|
180 | |
181 |
|
182 |
|
183 |
|
184 | autoHide?: boolean | avoidCallback | string | {
|
185 | type: string;
|
186 | cfg?: AxisLabelAutoHideCfg;
|
187 | };
|
188 | |
189 |
|
190 |
|
191 |
|
192 | autoEllipsis?: boolean | avoidCallback | string;
|
193 | }
|
194 |
|
195 |
|
196 |
|
197 |
|
198 | export interface AxisSubTickLineCfg {
|
199 | |
200 |
|
201 |
|
202 |
|
203 | style?: ShapeAttrs | ShapeAttrsCallback;
|
204 | |
205 |
|
206 |
|
207 |
|
208 | count?: number;
|
209 | |
210 |
|
211 |
|
212 |
|
213 | length?: number;
|
214 | }
|
215 |
|
216 |
|
217 |
|
218 |
|
219 | export interface AxisTitleCfg {
|
220 | |
221 |
|
222 |
|
223 |
|
224 | offset?: number;
|
225 | |
226 |
|
227 |
|
228 | spacing?: number;
|
229 | |
230 |
|
231 |
|
232 |
|
233 | style?: ShapeAttrs;
|
234 | |
235 |
|
236 |
|
237 |
|
238 | autoRotate?: boolean;
|
239 | |
240 |
|
241 |
|
242 |
|
243 | text?: string;
|
244 | }
|
245 | export interface BaseCfg {
|
246 | [key: string]: any;
|
247 | }
|
248 | export interface ComponentCfg extends BaseCfg {
|
249 | |
250 |
|
251 |
|
252 |
|
253 | id?: string;
|
254 | |
255 |
|
256 |
|
257 |
|
258 | LocationType?: string;
|
259 | |
260 |
|
261 |
|
262 |
|
263 | offsetX?: number;
|
264 | |
265 |
|
266 |
|
267 |
|
268 | offsetY?: number;
|
269 | |
270 |
|
271 |
|
272 |
|
273 | name?: string;
|
274 | |
275 |
|
276 |
|
277 |
|
278 |
|
279 | type?: string;
|
280 | |
281 |
|
282 |
|
283 | capture?: boolean;
|
284 | |
285 |
|
286 |
|
287 |
|
288 | animate?: boolean;
|
289 | |
290 |
|
291 |
|
292 | updateAutoRender?: boolean;
|
293 | |
294 |
|
295 |
|
296 |
|
297 | animateOption?: AnimateOption;
|
298 | |
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 | events?: object;
|
313 | |
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 |
|
324 | defaultCfg?: object;
|
325 | }
|
326 | export interface AnimateOption {
|
327 |
|
328 | appear?: AnimateCfg | false | null;
|
329 |
|
330 | enter?: AnimateCfg | false | null;
|
331 |
|
332 | update?: AnimateCfg | false | null;
|
333 |
|
334 | leave?: AnimateCfg | false | null;
|
335 | }
|
336 | export interface GroupComponentCfg extends ComponentCfg {
|
337 | |
338 |
|
339 |
|
340 |
|
341 | container: IGroup;
|
342 | |
343 |
|
344 |
|
345 |
|
346 | group?: IGroup;
|
347 | |
348 |
|
349 |
|
350 |
|
351 | capture?: boolean;
|
352 | }
|
353 | export interface HtmlComponentCfg extends ComponentCfg {
|
354 | |
355 |
|
356 |
|
357 |
|
358 | container?: HTMLElement | string;
|
359 | |
360 |
|
361 |
|
362 | parent?: HTMLElement | string;
|
363 | |
364 |
|
365 |
|
366 | domStyles?: LooseObject;
|
367 | }
|
368 | export interface OptimizeCfg {
|
369 |
|
370 | enable: boolean;
|
371 |
|
372 | threshold?: number;
|
373 | }
|
374 | export interface AxisBaseCfg extends GroupComponentCfg {
|
375 | |
376 |
|
377 |
|
378 |
|
379 | ticks: ListItem[];
|
380 | |
381 |
|
382 |
|
383 |
|
384 | line?: AxisLineCfg;
|
385 | |
386 |
|
387 |
|
388 |
|
389 | tickLine?: AxisTickLineCfg;
|
390 | |
391 |
|
392 |
|
393 |
|
394 | subTickLine?: AxisSubTickLineCfg;
|
395 | |
396 |
|
397 |
|
398 |
|
399 | title?: AxisTitleCfg;
|
400 | |
401 |
|
402 |
|
403 | label?: AxisLabelCfg;
|
404 | |
405 |
|
406 |
|
407 | verticalFactor?: number;
|
408 | |
409 |
|
410 |
|
411 |
|
412 | verticalLimitLength?: number;
|
413 | |
414 |
|
415 |
|
416 | overlapOrder?: string[];
|
417 | |
418 |
|
419 |
|
420 | optimize?: OptimizeCfg;
|
421 | }
|
422 | export interface LineAxisCfg extends AxisBaseCfg {
|
423 | |
424 |
|
425 |
|
426 |
|
427 | start: Point;
|
428 | |
429 |
|
430 |
|
431 |
|
432 | end: Point;
|
433 | }
|
434 | export interface CircleAxisCfg extends AxisBaseCfg {
|
435 | |
436 |
|
437 |
|
438 |
|
439 | center: Point;
|
440 | |
441 |
|
442 |
|
443 |
|
444 | radius: number;
|
445 | |
446 |
|
447 |
|
448 |
|
449 | startAngle?: number;
|
450 | |
451 |
|
452 |
|
453 |
|
454 | endAngle?: number;
|
455 | }
|
456 | export interface GridLineCfg {
|
457 | |
458 |
|
459 |
|
460 |
|
461 | type?: string;
|
462 | |
463 |
|
464 |
|
465 |
|
466 | style?: ShapeAttrs | ShapeAttrsCallback;
|
467 | }
|
468 | export interface GridBaseCfg extends GroupComponentCfg {
|
469 | |
470 |
|
471 |
|
472 |
|
473 | line?: GridLineCfg;
|
474 | |
475 |
|
476 |
|
477 |
|
478 | alternateColor?: string | string[];
|
479 | |
480 |
|
481 |
|
482 |
|
483 | items: GridItem[];
|
484 | |
485 |
|
486 |
|
487 |
|
488 | closed?: boolean;
|
489 | }
|
490 | export interface CircleGridCfg extends GridBaseCfg {
|
491 | |
492 |
|
493 |
|
494 |
|
495 | center: Point;
|
496 | }
|
497 | export interface LegendBaseCfg extends GroupComponentCfg {
|
498 | |
499 |
|
500 |
|
501 |
|
502 | layout?: string;
|
503 | |
504 |
|
505 |
|
506 |
|
507 | x?: number;
|
508 | |
509 |
|
510 |
|
511 |
|
512 | y?: number;
|
513 | |
514 |
|
515 |
|
516 |
|
517 | title?: LegendTitleCfg;
|
518 | |
519 |
|
520 |
|
521 |
|
522 | background?: LegendBackgroundCfg;
|
523 | }
|
524 | export interface CategoryLegendCfg extends LegendBaseCfg {
|
525 | |
526 |
|
527 |
|
528 |
|
529 | itemSpacing?: number;
|
530 | |
531 |
|
532 |
|
533 | maxItemWidth?: number;
|
534 | |
535 |
|
536 |
|
537 |
|
538 | itemWidth?: number;
|
539 | |
540 |
|
541 |
|
542 |
|
543 | itemHeight?: number;
|
544 | |
545 |
|
546 |
|
547 |
|
548 | itemName?: LegendItemNameCfg;
|
549 | |
550 |
|
551 |
|
552 |
|
553 | itemValue?: LegendItemValueCfg;
|
554 | |
555 |
|
556 |
|
557 |
|
558 | maxWidth?: number;
|
559 | |
560 |
|
561 |
|
562 |
|
563 | maxHeight?: number;
|
564 | |
565 |
|
566 |
|
567 |
|
568 | marker?: LegendMarkerCfg;
|
569 | |
570 |
|
571 |
|
572 |
|
573 | items: ListItem[];
|
574 | |
575 |
|
576 |
|
577 |
|
578 | flipNavigation: LegendPageNavigatorCfg;
|
579 | }
|
580 | export interface ContinueLegendCfg extends LegendBaseCfg {
|
581 | |
582 |
|
583 |
|
584 |
|
585 | min: number;
|
586 | |
587 |
|
588 |
|
589 |
|
590 | max: number;
|
591 | |
592 |
|
593 |
|
594 |
|
595 | value: number[];
|
596 | |
597 |
|
598 |
|
599 |
|
600 | colors: number[];
|
601 | |
602 |
|
603 |
|
604 |
|
605 | track: ContinueLegendTrackCfg;
|
606 | |
607 |
|
608 |
|
609 |
|
610 | rail: ContinueLegendRailCfg;
|
611 | |
612 |
|
613 |
|
614 |
|
615 | label: ContinueLegendLabelCfg;
|
616 | |
617 |
|
618 |
|
619 |
|
620 | handler: ContinueLegendHandlerCfg;
|
621 | |
622 |
|
623 |
|
624 |
|
625 | slidable: boolean;
|
626 | }
|
627 | export interface ContinueLegendTrackCfg {
|
628 | |
629 |
|
630 |
|
631 |
|
632 | style?: ShapeAttrs;
|
633 | }
|
634 | export interface ContinueLegendHandlerCfg {
|
635 | |
636 |
|
637 |
|
638 |
|
639 | size?: number;
|
640 | |
641 |
|
642 |
|
643 |
|
644 | style?: ShapeAttrs;
|
645 | }
|
646 | export interface ContinueLegendRailCfg {
|
647 | |
648 |
|
649 |
|
650 |
|
651 | type?: string;
|
652 | |
653 |
|
654 |
|
655 |
|
656 | size?: number;
|
657 | |
658 |
|
659 |
|
660 |
|
661 | defaultLength?: number;
|
662 | |
663 |
|
664 |
|
665 |
|
666 | style?: ShapeAttrs;
|
667 | }
|
668 | export interface ContinueLegendLabelCfg {
|
669 | |
670 |
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 | align?: string;
|
677 | |
678 |
|
679 |
|
680 |
|
681 | formatter?: (text: string | number | null) => string;
|
682 | |
683 |
|
684 |
|
685 |
|
686 | spacing?: number;
|
687 | |
688 |
|
689 |
|
690 |
|
691 | style?: ShapeAttrs;
|
692 | }
|
693 | export interface LegendTitleCfg {
|
694 | |
695 |
|
696 |
|
697 |
|
698 | spacing?: number;
|
699 | |
700 |
|
701 |
|
702 |
|
703 | style?: ShapeAttrs;
|
704 | }
|
705 | export interface LegendBackgroundCfg {
|
706 | |
707 |
|
708 |
|
709 |
|
710 | padding?: number | number[];
|
711 | |
712 |
|
713 |
|
714 |
|
715 | style?: ShapeAttrs;
|
716 | }
|
717 | export interface LegendItemNameCfg {
|
718 | |
719 |
|
720 |
|
721 |
|
722 | spacing?: number;
|
723 | |
724 |
|
725 |
|
726 |
|
727 | formatter?: formatterCallback;
|
728 | |
729 |
|
730 |
|
731 |
|
732 | style?: ShapeAttrs;
|
733 | }
|
734 | declare type formatterCallback = (text: string, item: ListItem, index: number) => any;
|
735 | export interface LegendItemValueCfg {
|
736 | |
737 |
|
738 |
|
739 |
|
740 | alignRight?: boolean;
|
741 | |
742 |
|
743 |
|
744 |
|
745 | formatter?: formatterCallback;
|
746 | |
747 |
|
748 |
|
749 |
|
750 | style?: ShapeAttrs;
|
751 | }
|
752 | export interface LegendMarkerCfg {
|
753 | |
754 |
|
755 |
|
756 |
|
757 | spacing?: number;
|
758 | |
759 |
|
760 |
|
761 | symbol?: string | ((x: number, y: number, r: number) => any);
|
762 | /**
|
763 | * 图例项 marker 的配置项
|
764 | * @type {ShapeAttrs}
|
765 | */
|
766 | style?: ShapeAttrs;
|
767 | }
|
768 | /**
|
769 | * 图例导航器,代指分页器
|
770 | */
|
771 | export interface LegendPageNavigatorCfg {
|
772 | marker?: {
|
773 | style?: {
|
774 | /** 分页导航器 icon 填充色, 默认 #000 */
|
775 | fill?: string;
|
776 | /** 分页导航器 icon 填充色 透明度, 默认 1 */
|
777 | opacity?: number;
|
778 | /** 分页导航器 icon 非激活时的填充色 */
|
779 | inactiveFill?: string;
|
780 | /** 分页导航器 icon 非激活时的填充色 透明度, 默认 0.45 */
|
781 | inactiveOpacity?: number;
|
782 | /** 分页器的大小 */
|
783 | size?: number;
|
784 | };
|
785 | };
|
786 | text?: {
|
787 | style?: {
|
788 | /** 分页导航器 文本 填充色,默认 #ccc */
|
789 | fill?: string;
|
790 | /** 字体大小, 默认 12px */
|
791 | fontSize?: number;
|
792 | };
|
793 | };
|
794 | }
|
795 | export declare type TooltipPosition = 'top' | 'left' | 'right' | 'bottom' | 'auto';
|
796 | export interface TooltipCfg extends HtmlComponentCfg {
|
797 | /**
|
798 | * 位置 x
|
799 | * @type {number}
|
800 | */
|
801 | x?: number;
|
802 | /**
|
803 | * 位置 y
|
804 | * @type {number}
|
805 | */
|
806 | y?: number;
|
807 | /**
|
808 | * 列表项集合
|
809 | * @type {ListItem[]}
|
810 | */
|
811 | items: ListItem[];
|
812 | /**
|
813 | * 容器的模板
|
814 | * @type {string}
|
815 | */
|
816 | containerTpl?: string;
|
817 | /**
|
818 | * 列表项的模板
|
819 | * @type {[type]}
|
820 | */
|
821 | itemTpl?: string;
|
822 | /**
|
823 | * 根据 x 定位的 crosshair 的模板
|
824 | * @type {string}
|
825 | */
|
826 | xCrosshairTpl?: string;
|
827 | /**
|
828 | * 根据 y 定位的 crosshair 的模板
|
829 | * @type {[type]}
|
830 | */
|
831 | yCrosshairTpl?: string;
|
832 | /**
|
833 | * tooltip 限制的区域
|
834 | * @type {Region}
|
835 | */
|
836 | region?: Region;
|
837 | /**
|
838 | * crosshairs 限制的区域
|
839 | * @type {Region}
|
840 | */
|
841 | crosshairsRegion?: Region;
|
842 | /**
|
843 | * crosshairs 的类型, x,y,xy
|
844 | * @type {string}
|
845 | */
|
846 | crosshairs?: string;
|
847 | /**
|
848 | * 是否跟随鼠标移动,会影响 x,y的定位
|
849 | * @type {boolean}
|
850 | */
|
851 | follow?: boolean;
|
852 | /**
|
853 | * 偏移量,同 position 相关
|
854 | * @type {number}
|
855 | */
|
856 | offset?: number;
|
857 | /**
|
858 | * 位置,top, bottom, left, right
|
859 | * @type {string}
|
860 | */
|
861 | position?: TooltipPosition;
|
862 | /**
|
863 | * 传入各个 dom 的样式
|
864 | * @type {object}
|
865 | */
|
866 | domStyles?: object;
|
867 | /**
|
868 | * 默认的各个 dom 的样式
|
869 | * @type {object}
|
870 | */
|
871 | defaultStyles?: object;
|
872 | }
|
873 | export interface LocationCfg {
|
874 | [key: string]: any;
|
875 | }
|
876 | export interface PointLocationCfg extends LocationCfg {
|
877 | /**
|
878 | * 位置 x
|
879 | * @type {number}
|
880 | */
|
881 | x?: number;
|
882 | /**
|
883 | * 位置 y
|
884 | * @type {number}
|
885 | */
|
886 | y?: number;
|
887 | }
|
888 | export interface RegionLocationCfg extends LocationCfg {
|
889 | /**
|
890 | * 起始点
|
891 | * @type {Point}
|
892 | */
|
893 | start?: Point;
|
894 | /**
|
895 | * 结束点
|
896 | * @type {Point}
|
897 | */
|
898 | end?: Point;
|
899 | }
|
900 | export interface PointsLocationCfg extends LocationCfg {
|
901 | /**
|
902 | * 定位点的集合
|
903 | * @type {Point[]}
|
904 | */
|
905 | points?: Point[];
|
906 | }
|
907 | export interface CircleLocationCfg extends LocationCfg {
|
908 | /**
|
909 | * 圆心
|
910 | * @type {Point}
|
911 | */
|
912 | center?: Point;
|
913 | /**
|
914 | * 半径
|
915 | * @type {number}
|
916 | */
|
917 | radius?: number;
|
918 | /**
|
919 | * 起始角度
|
920 | * @type {number}
|
921 | */
|
922 | startAngle?: number;
|
923 | /**
|
924 | * 结束角度
|
925 | * @type {number}
|
926 | */
|
927 | endAngle?: number;
|
928 | }
|
929 | /**
|
930 | * 自定义 Shape annotation 组件配置
|
931 | */
|
932 | export interface ShapeAnnotationCfg extends GroupComponentCfg {
|
933 | /** 自定义 render 函数,注意绘制的 shape/group 需要设置 id */
|
934 | render: (container: IGroup) => void;
|
935 | }
|
936 |
|
937 |
|
938 |
|
939 | export interface HtmlAnnotationCfg extends HtmlComponentCfg {
|
940 |
|
941 | alignX?: 'left' | 'middle' | 'right';
|
942 |
|
943 | alignY?: 'top' | 'middle' | 'bottom';
|
944 |
|
945 | html: string | HTMLElement | ((container: HTMLElement) => void | string | HTMLElement);
|
946 | /** zIndex 设置 */
|
947 | zIndex?: number;
|
948 | }
|
949 | export interface TextAnnotationCfg extends GroupComponentCfg, EnhancedTextCfg {
|
950 | /**
|
951 | * 文本标注位置 x
|
952 | * @type {number}
|
953 | */
|
954 | x: number;
|
955 | /**
|
956 | * 文本标注位置 y
|
957 | * @type {number}
|
958 | */
|
959 | y: number;
|
960 | }
|
961 | export interface LineAnnotationCfg extends GroupComponentCfg {
|
962 | /**
|
963 | * 起始点
|
964 | * @type {Point}
|
965 | */
|
966 | start?: Point;
|
967 | /**
|
968 | * 结束点
|
969 | * @type {Point}
|
970 | */
|
971 | end?: Point;
|
972 | /**
|
973 | * 线上的文本配置
|
974 | * @type {LineAnnotationTextCfg}
|
975 | */
|
976 | text?: LineAnnotationTextCfg;
|
977 | /**
|
978 | * 线的样式
|
979 | * @type {ShapeAttrs}
|
980 | */
|
981 | style?: ShapeAttrs;
|
982 | }
|
983 | export interface LineAnnotationTextCfg extends EnhancedTextCfg {
|
984 | /**
|
985 | * 位置,可以选择: start, end, center 和 '50%' 这类的百分比写法,默认 'center'
|
986 | * @type {string}
|
987 | */
|
988 | position?: string;
|
989 | /**
|
990 | * 自动旋转,沿着线的方向,默认 true
|
991 | * @type {boolean}
|
992 | */
|
993 | autoRotate?: boolean;
|
994 | /**
|
995 | * 文本的偏移 x
|
996 | * @type {number}
|
997 | */
|
998 | offsetX?: number;
|
999 | /**
|
1000 | * 文本的偏移 y
|
1001 | * @type {number}
|
1002 | */
|
1003 | offsetY?: number;
|
1004 | }
|
1005 | export interface RegionAnnotationCfg extends GroupComponentCfg {
|
1006 | /**
|
1007 | * 起始点
|
1008 | * @type {Point}
|
1009 | */
|
1010 | start?: Point;
|
1011 | /**
|
1012 | * 结束点
|
1013 | * @type {Point}
|
1014 | */
|
1015 | end?: Point;
|
1016 | /**
|
1017 | * 区域的样式
|
1018 | * @type {ShapeAttrs}
|
1019 | */
|
1020 | style?: ShapeAttrs;
|
1021 | }
|
1022 | export interface ImageAnnotationCfg extends GroupComponentCfg {
|
1023 | /**
|
1024 | * 起始点
|
1025 | * @type {Point}
|
1026 | */
|
1027 | start?: Point;
|
1028 | /**
|
1029 | * 结束点
|
1030 | * @type {Point}
|
1031 | */
|
1032 | end?: Point;
|
1033 | /**
|
1034 | * 图片地址
|
1035 | * @type {string}
|
1036 | */
|
1037 | src?: string;
|
1038 | /**
|
1039 | * 区域的样式
|
1040 | * @type {ShapeAttrs}
|
1041 | */
|
1042 | style?: ShapeAttrs;
|
1043 | }
|
1044 | export interface ArcAnnotationCfg extends GroupComponentCfg {
|
1045 | /**
|
1046 | * 圆心
|
1047 | * @type {Point}
|
1048 | */
|
1049 | center?: Point;
|
1050 | /**
|
1051 | * 半径
|
1052 | * @type {number}
|
1053 | */
|
1054 | radius?: number;
|
1055 | /**
|
1056 | * 其实角度
|
1057 | * @type {number}
|
1058 | */
|
1059 | startAngle?: number;
|
1060 | /**
|
1061 | * 结束角度
|
1062 | * @type {number}
|
1063 | */
|
1064 | endAngle?: number;
|
1065 | /**
|
1066 | * 区域的样式
|
1067 | * @type {ShapeAttrs}
|
1068 | */
|
1069 | style?: ShapeAttrs;
|
1070 | }
|
1071 | export interface DataMarkerTextCfg extends EnhancedTextCfg {
|
1072 | display?: boolean;
|
1073 | }
|
1074 | export interface DataMarkerAnnotationCfg extends GroupComponentCfg {
|
1075 | /**
|
1076 | * 标注位置 x
|
1077 | * @type {number}
|
1078 | */
|
1079 | x: number;
|
1080 | /**
|
1081 | * 标注位置 y
|
1082 | * @type {number}
|
1083 | */
|
1084 | y: number;
|
1085 | point?: {
|
1086 | display?: boolean;
|
1087 | style?: ShapeAttrs;
|
1088 | };
|
1089 | line?: {
|
1090 | display?: boolean;
|
1091 | length?: number;
|
1092 | style?: ShapeAttrs;
|
1093 | };
|
1094 | text: DataMarkerTextCfg;
|
1095 | /**
|
1096 | * 方向
|
1097 | */
|
1098 | direction?: 'upward' | 'downward';
|
1099 | /**
|
1100 | * 是否自动调整
|
1101 | */
|
1102 | autoAdjust?: boolean;
|
1103 | /**
|
1104 | * Coord 的 BBox,用于 autoAdjust
|
1105 | */
|
1106 | coordBBox?: BBox;
|
1107 | }
|
1108 | export interface DataRegionAnnotationCfg extends GroupComponentCfg {
|
1109 | /**
|
1110 | * 位置点信息
|
1111 | * @type {Point}
|
1112 | */
|
1113 | points: Point[];
|
1114 | region?: {
|
1115 | style?: ShapeAttrs;
|
1116 | };
|
1117 | text: EnhancedTextCfg;
|
1118 | }
|
1119 | export interface RegionFilterAnnotationCfg extends GroupComponentCfg {
|
1120 | /**
|
1121 | * 起始点
|
1122 | * @type {Point}
|
1123 | */
|
1124 | start: Point;
|
1125 | /**
|
1126 | * 结束点
|
1127 | * @type {Point}
|
1128 | */
|
1129 | end: Point;
|
1130 | /**
|
1131 | * 染色色值
|
1132 | */
|
1133 | color: string;
|
1134 | /**
|
1135 | * 图形上的 Shapes
|
1136 | */
|
1137 | shapes: IShape[];
|
1138 | }
|
1139 | export interface CrosshairBaseCfg extends GroupComponentCfg {
|
1140 | /**
|
1141 | * 线的样式
|
1142 | * @type {CrosshairLineCfg}
|
1143 | */
|
1144 | line?: CrosshairLineCfg;
|
1145 | /**
|
1146 | * 附加文本的样式
|
1147 | * @type {CrosshairTextCfg}
|
1148 | */
|
1149 | text?: CrosshairTextCfg;
|
1150 | /**
|
1151 | * 文本背景的配置项
|
1152 | * @type {CrosshairTextBackgroundCfg}
|
1153 | */
|
1154 | textBackground?: CrosshairTextBackgroundCfg;
|
1155 | }
|
1156 | export interface LineCrosshairCfg extends CrosshairBaseCfg {
|
1157 | /**
|
1158 | * 起始点
|
1159 | * @type {Point}
|
1160 | */
|
1161 | start: Point;
|
1162 | /**
|
1163 | * 结束点
|
1164 | * @type {Point}
|
1165 | */
|
1166 | end: Point;
|
1167 | }
|
1168 | export interface CircleCrosshairCfg extends CrosshairBaseCfg {
|
1169 | /**
|
1170 | * 圆心
|
1171 | * @type {Point}
|
1172 | */
|
1173 | center: Point;
|
1174 | /**
|
1175 | * 半径
|
1176 | * @type {number}
|
1177 | */
|
1178 | radius: number;
|
1179 | /**
|
1180 | * 开始角度
|
1181 | * @type {number}
|
1182 | */
|
1183 | startAngle: number;
|
1184 | /**
|
1185 | * 结束角度
|
1186 | * @type {number}
|
1187 | */
|
1188 | endAngle: number;
|
1189 | }
|
1190 | export interface CrosshairTextBaseCfg {
|
1191 | /**
|
1192 | * 文本位置,只支持 start, end
|
1193 | * @type {string}
|
1194 | */
|
1195 | position?: string;
|
1196 | /**
|
1197 | * 文本内容
|
1198 | */
|
1199 | content?: string;
|
1200 | /**
|
1201 | * 距离线的距离
|
1202 | * @type {number}
|
1203 | */
|
1204 | offset?: number;
|
1205 | }
|
1206 | export interface CrosshairTextCfg extends CrosshairTextBaseCfg {
|
1207 | /**
|
1208 | * 是否自动旋转
|
1209 | * @type {boolean}
|
1210 | */
|
1211 | autoRotate?: boolean;
|
1212 | /**
|
1213 | * 文本的配置项
|
1214 | * @type {ShapeAttrs}
|
1215 | */
|
1216 | style?: ShapeAttrs;
|
1217 | }
|
1218 | export interface HtmlCrossHairCfg extends HtmlComponentCfg {
|
1219 | /**
|
1220 | * 起始位置
|
1221 | */
|
1222 | start: Point;
|
1223 | /**
|
1224 | * 结束位置
|
1225 | */
|
1226 | end: Point;
|
1227 | /**
|
1228 | * crosshair 的模板
|
1229 | */
|
1230 | crossHairTpl: string;
|
1231 | /**
|
1232 | * 文本的模板
|
1233 | */
|
1234 | textTpl: string;
|
1235 | /**
|
1236 | * 文本
|
1237 | */
|
1238 | text: CrosshairTextBaseCfg;
|
1239 | }
|
1240 | export interface CrosshairLineCfg {
|
1241 | /**
|
1242 | * 线的配置项
|
1243 | * @type {ShapeAttrs}
|
1244 | */
|
1245 | style?: ShapeAttrs;
|
1246 | }
|
1247 | export interface CrosshairTextBackgroundCfg {
|
1248 | /**
|
1249 | * 文本背景周围的留白
|
1250 | * @type {number|number[]}
|
1251 | */
|
1252 | padding?: number | number[];
|
1253 | /**
|
1254 | * 文本背景的样式
|
1255 | * @type {ShapeAttrs}
|
1256 | */
|
1257 | style?: ShapeAttrs;
|
1258 | }
|
1259 | export { SliderCfg, TrendCfg } from './slider';
|
1260 | export { ScrollbarCfg, ScrollbarTheme } from './scrollbar';
|
1261 |
|
\ | No newline at end of file |