@visactor/vrender-components 0.9.1 → 0.9.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/cjs/axis/circle.d.ts +7 -7
- package/cjs/axis/config.d.ts +7 -7
- package/cjs/axis/config.js +7 -7
- package/cjs/axis/config.js.map +1 -1
- package/cjs/axis/grid.js +2 -4
- package/cjs/axis/grid.js.map +1 -1
- package/cjs/axis/line.d.ts +7 -7
- package/cjs/brush/brush.d.ts +2 -3
- package/cjs/brush/config.d.ts +2 -3
- package/cjs/brush/config.js +2 -3
- package/cjs/brush/config.js.map +1 -1
- package/cjs/crosshair/circle.d.ts +1 -2
- package/cjs/crosshair/circle.js +1 -2
- package/cjs/crosshair/circle.js.map +1 -1
- package/cjs/crosshair/line.d.ts +1 -2
- package/cjs/crosshair/line.js +1 -2
- package/cjs/crosshair/line.js.map +1 -1
- package/cjs/crosshair/polygon.d.ts +1 -2
- package/cjs/crosshair/polygon.js +1 -2
- package/cjs/crosshair/polygon.js.map +1 -1
- package/cjs/crosshair/rect.d.ts +1 -1
- package/cjs/crosshair/rect.js +1 -1
- package/cjs/crosshair/rect.js.map +1 -1
- package/cjs/crosshair/sector.d.ts +1 -1
- package/cjs/crosshair/sector.js +1 -1
- package/cjs/crosshair/sector.js.map +1 -1
- package/cjs/data-zoom/config.d.ts +18 -27
- package/cjs/data-zoom/config.js +18 -27
- package/cjs/data-zoom/config.js.map +1 -1
- package/cjs/data-zoom/data-zoom.d.ts +18 -27
- package/cjs/data-zoom/type.js +2 -1
- package/cjs/indicator/config.js +2 -4
- package/cjs/indicator/config.js.map +1 -1
- package/cjs/indicator/type.js +1 -2
- package/cjs/label/base.js +6 -6
- package/cjs/label/base.js.map +1 -1
- package/cjs/label/dataLabel.js +2 -1
- package/cjs/label/line.js +3 -2
- package/cjs/label/line.js.map +1 -1
- package/cjs/label/rect.js +3 -2
- package/cjs/label/rect.js.map +1 -1
- package/cjs/label/symbol.js +3 -2
- package/cjs/label/symbol.js.map +1 -1
- package/cjs/legend/color/color.d.ts +3 -3
- package/cjs/legend/color/color.js +6 -7
- package/cjs/legend/color/color.js.map +1 -1
- package/cjs/legend/discrete/discrete.js +12 -12
- package/cjs/legend/discrete/discrete.js.map +1 -1
- package/cjs/legend/discrete/type.d.ts +2 -4
- package/cjs/legend/discrete/type.js.map +1 -1
- package/cjs/legend/size/size.d.ts +4 -4
- package/cjs/legend/size/size.js +4 -4
- package/cjs/legend/size/size.js.map +1 -1
- package/cjs/marker/area.d.ts +4 -7
- package/cjs/marker/base.js +1 -2
- package/cjs/marker/config.d.ts +14 -26
- package/cjs/marker/config.js +14 -26
- package/cjs/marker/config.js.map +1 -1
- package/cjs/marker/point.d.ts +4 -8
- package/cjs/pager/pager.js +3 -4
- package/cjs/pager/pager.js.map +1 -1
- package/cjs/player/controller/controller.js +1 -1
- package/cjs/player/controller/controller.js.map +1 -1
- package/cjs/scrollbar/scrollbar.d.ts +2 -4
- package/cjs/scrollbar/scrollbar.js +2 -4
- package/cjs/scrollbar/scrollbar.js.map +1 -1
- package/cjs/segment/segment.js +3 -3
- package/cjs/segment/segment.js.map +1 -1
- package/cjs/slider/slider.d.ts +7 -9
- package/cjs/slider/slider.js +8 -10
- package/cjs/slider/slider.js.map +1 -1
- package/cjs/tag/tag.js +2 -2
- package/cjs/tag/tag.js.map +1 -1
- package/cjs/title/title.js +2 -2
- package/cjs/title/title.js.map +1 -1
- package/cjs/tooltip/config.js +6 -12
- package/cjs/tooltip/config.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.min.js +1 -0
- package/es/axis/circle.d.ts +7 -7
- package/es/axis/config.d.ts +7 -7
- package/es/axis/config.js +7 -7
- package/es/axis/config.js.map +1 -1
- package/es/axis/grid.js +2 -4
- package/es/axis/grid.js.map +1 -1
- package/es/axis/line.d.ts +7 -7
- package/es/brush/brush.d.ts +2 -3
- package/es/brush/config.d.ts +2 -3
- package/es/brush/config.js +2 -3
- package/es/brush/config.js.map +1 -1
- package/es/crosshair/circle.d.ts +1 -2
- package/es/crosshair/circle.js +1 -2
- package/es/crosshair/circle.js.map +1 -1
- package/es/crosshair/line.d.ts +1 -2
- package/es/crosshair/line.js +1 -2
- package/es/crosshair/line.js.map +1 -1
- package/es/crosshair/polygon.d.ts +1 -2
- package/es/crosshair/polygon.js +1 -2
- package/es/crosshair/polygon.js.map +1 -1
- package/es/crosshair/rect.d.ts +1 -1
- package/es/crosshair/rect.js +1 -1
- package/es/crosshair/rect.js.map +1 -1
- package/es/crosshair/sector.d.ts +1 -1
- package/es/crosshair/sector.js +1 -1
- package/es/crosshair/sector.js.map +1 -1
- package/es/data-zoom/config.d.ts +18 -27
- package/es/data-zoom/config.js +18 -27
- package/es/data-zoom/config.js.map +1 -1
- package/es/data-zoom/data-zoom.d.ts +18 -27
- package/es/data-zoom/type.js +2 -1
- package/es/indicator/config.js +2 -4
- package/es/indicator/config.js.map +1 -1
- package/es/indicator/type.js +1 -2
- package/es/label/base.js +6 -6
- package/es/label/base.js.map +1 -1
- package/es/label/dataLabel.js +2 -1
- package/es/label/line.js +3 -2
- package/es/label/line.js.map +1 -1
- package/es/label/rect.js +3 -2
- package/es/label/rect.js.map +1 -1
- package/es/label/symbol.js +3 -2
- package/es/label/symbol.js.map +1 -1
- package/es/legend/color/color.d.ts +3 -3
- package/es/legend/color/color.js +6 -7
- package/es/legend/color/color.js.map +1 -1
- package/es/legend/discrete/discrete.js +13 -13
- package/es/legend/discrete/discrete.js.map +1 -1
- package/es/legend/discrete/type.d.ts +2 -4
- package/es/legend/discrete/type.js.map +1 -1
- package/es/legend/size/size.d.ts +4 -4
- package/es/legend/size/size.js +4 -4
- package/es/legend/size/size.js.map +1 -1
- package/es/marker/area.d.ts +4 -7
- package/es/marker/base.js +1 -2
- package/es/marker/config.d.ts +14 -26
- package/es/marker/config.js +14 -26
- package/es/marker/config.js.map +1 -1
- package/es/marker/point.d.ts +4 -8
- package/es/pager/pager.js +3 -4
- package/es/pager/pager.js.map +1 -1
- package/es/player/controller/controller.js +1 -1
- package/es/player/controller/controller.js.map +1 -1
- package/es/scrollbar/scrollbar.d.ts +2 -4
- package/es/scrollbar/scrollbar.js +2 -4
- package/es/scrollbar/scrollbar.js.map +1 -1
- package/es/segment/segment.js +3 -3
- package/es/segment/segment.js.map +1 -1
- package/es/slider/slider.d.ts +7 -9
- package/es/slider/slider.js +8 -10
- package/es/slider/slider.js.map +1 -1
- package/es/tag/tag.js +2 -2
- package/es/tag/tag.js.map +1 -1
- package/es/title/title.js +2 -2
- package/es/title/title.js.map +1 -1
- package/es/tooltip/config.js +6 -12
- package/es/tooltip/config.js.map +1 -1
- package/package.json +10 -4
- package/dist/vrender-components.js.js +0 -1
- package/dist/vrender-components.js.min.js +0 -1
|
@@ -9,47 +9,42 @@ export declare const DEFAULT_DATA_ZOOM_ATTRIBUTES: {
|
|
|
9
9
|
showDetail: string;
|
|
10
10
|
brushSelect: boolean;
|
|
11
11
|
backgroundStyle: {
|
|
12
|
-
fill:
|
|
13
|
-
|
|
14
|
-
strokeColor: string;
|
|
12
|
+
fill: string;
|
|
13
|
+
stroke: string;
|
|
15
14
|
lineWidth: number;
|
|
16
15
|
borderRadius: number;
|
|
17
16
|
};
|
|
18
17
|
dragMaskStyle: {
|
|
19
|
-
fill:
|
|
20
|
-
fillColor: string;
|
|
18
|
+
fill: string;
|
|
21
19
|
fillOpacity: number;
|
|
22
20
|
};
|
|
23
21
|
backgroundChartStyle: {
|
|
24
22
|
area: {
|
|
25
23
|
visible: boolean;
|
|
26
|
-
|
|
24
|
+
stroke: string;
|
|
27
25
|
lineWidth: number;
|
|
28
|
-
|
|
29
|
-
fill: boolean;
|
|
26
|
+
fill: string;
|
|
30
27
|
};
|
|
31
28
|
line: {
|
|
32
29
|
visible: boolean;
|
|
33
|
-
|
|
30
|
+
stroke: string;
|
|
34
31
|
lineWidth: number;
|
|
35
32
|
};
|
|
36
33
|
};
|
|
37
34
|
selectedBackgroundStyle: {
|
|
38
|
-
fill:
|
|
39
|
-
fillColor: string;
|
|
35
|
+
fill: string;
|
|
40
36
|
fillOpacity: number;
|
|
41
37
|
};
|
|
42
38
|
selectedBackgroundChartStyle: {
|
|
43
39
|
area: {
|
|
44
40
|
visible: boolean;
|
|
45
|
-
|
|
41
|
+
stroke: string;
|
|
46
42
|
lineWidth: number;
|
|
47
|
-
|
|
48
|
-
fill: boolean;
|
|
43
|
+
fill: string;
|
|
49
44
|
};
|
|
50
45
|
line: {
|
|
51
46
|
visible: boolean;
|
|
52
|
-
|
|
47
|
+
stroke: string;
|
|
53
48
|
lineWidth: number;
|
|
54
49
|
};
|
|
55
50
|
};
|
|
@@ -58,33 +53,29 @@ export declare const DEFAULT_DATA_ZOOM_ATTRIBUTES: {
|
|
|
58
53
|
background: {
|
|
59
54
|
size: number;
|
|
60
55
|
style: {
|
|
61
|
-
fill:
|
|
62
|
-
|
|
63
|
-
strokeColor: string;
|
|
56
|
+
fill: string;
|
|
57
|
+
stroke: string;
|
|
64
58
|
borderRadius: number;
|
|
65
59
|
};
|
|
66
60
|
};
|
|
67
61
|
icon: {
|
|
68
62
|
size: number;
|
|
69
|
-
fill:
|
|
70
|
-
|
|
71
|
-
strokeColor: string;
|
|
63
|
+
fill: string;
|
|
64
|
+
stroke: string;
|
|
72
65
|
symbolType: string;
|
|
73
66
|
lineWidth: number;
|
|
74
67
|
};
|
|
75
68
|
};
|
|
76
69
|
startHandlerStyle: {
|
|
77
70
|
symbolType: string;
|
|
78
|
-
fill:
|
|
79
|
-
|
|
80
|
-
strokeColor: string;
|
|
71
|
+
fill: string;
|
|
72
|
+
stroke: string;
|
|
81
73
|
lineWidth: number;
|
|
82
74
|
};
|
|
83
75
|
endHandlerStyle: {
|
|
84
76
|
symbolType: string;
|
|
85
|
-
fill:
|
|
86
|
-
|
|
87
|
-
strokeColor: string;
|
|
77
|
+
fill: string;
|
|
78
|
+
stroke: string;
|
|
88
79
|
lineWidth: number;
|
|
89
80
|
};
|
|
90
81
|
startTextStyle: {
|
package/cjs/data-zoom/config.js
CHANGED
|
@@ -13,47 +13,42 @@ exports.DEFAULT_DATA_ZOOM_ATTRIBUTES = {
|
|
|
13
13
|
showDetail: "auto",
|
|
14
14
|
brushSelect: !0,
|
|
15
15
|
backgroundStyle: {
|
|
16
|
-
fill:
|
|
17
|
-
|
|
18
|
-
strokeColor: "#D1DBEE",
|
|
16
|
+
fill: "white",
|
|
17
|
+
stroke: "#D1DBEE",
|
|
19
18
|
lineWidth: 1,
|
|
20
19
|
borderRadius: 2
|
|
21
20
|
},
|
|
22
21
|
dragMaskStyle: {
|
|
23
|
-
fill:
|
|
24
|
-
fillColor: "#B0C8F9",
|
|
22
|
+
fill: "#B0C8F9",
|
|
25
23
|
fillOpacity: .2
|
|
26
24
|
},
|
|
27
25
|
backgroundChartStyle: {
|
|
28
26
|
area: {
|
|
29
27
|
visible: !0,
|
|
30
|
-
|
|
28
|
+
stroke: "#D1DBEE",
|
|
31
29
|
lineWidth: 1,
|
|
32
|
-
|
|
33
|
-
fill: !0
|
|
30
|
+
fill: "#F6F8FC"
|
|
34
31
|
},
|
|
35
32
|
line: {
|
|
36
33
|
visible: !0,
|
|
37
|
-
|
|
34
|
+
stroke: "#D1DBEE",
|
|
38
35
|
lineWidth: 1
|
|
39
36
|
}
|
|
40
37
|
},
|
|
41
38
|
selectedBackgroundStyle: {
|
|
42
|
-
fill:
|
|
43
|
-
fillColor: "#B0C8F9",
|
|
39
|
+
fill: "#B0C8F9",
|
|
44
40
|
fillOpacity: .5
|
|
45
41
|
},
|
|
46
42
|
selectedBackgroundChartStyle: {
|
|
47
43
|
area: {
|
|
48
44
|
visible: !0,
|
|
49
|
-
|
|
45
|
+
stroke: "#B0C8F9",
|
|
50
46
|
lineWidth: 1,
|
|
51
|
-
|
|
52
|
-
fill: !0
|
|
47
|
+
fill: "#fbb934"
|
|
53
48
|
},
|
|
54
49
|
line: {
|
|
55
50
|
visible: !0,
|
|
56
|
-
|
|
51
|
+
stroke: "#fbb934",
|
|
57
52
|
lineWidth: 1
|
|
58
53
|
}
|
|
59
54
|
},
|
|
@@ -62,33 +57,29 @@ exports.DEFAULT_DATA_ZOOM_ATTRIBUTES = {
|
|
|
62
57
|
background: {
|
|
63
58
|
size: 8,
|
|
64
59
|
style: {
|
|
65
|
-
fill:
|
|
66
|
-
|
|
67
|
-
strokeColor: "#B0C8F9",
|
|
60
|
+
fill: "white",
|
|
61
|
+
stroke: "#B0C8F9",
|
|
68
62
|
borderRadius: 2
|
|
69
63
|
}
|
|
70
64
|
},
|
|
71
65
|
icon: {
|
|
72
66
|
size: 6,
|
|
73
|
-
fill:
|
|
74
|
-
|
|
75
|
-
strokeColor: "#B0C8F9",
|
|
67
|
+
fill: "white",
|
|
68
|
+
stroke: "#B0C8F9",
|
|
76
69
|
symbolType: "M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",
|
|
77
70
|
lineWidth: .5
|
|
78
71
|
}
|
|
79
72
|
},
|
|
80
73
|
startHandlerStyle: {
|
|
81
74
|
symbolType: "M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z",
|
|
82
|
-
fill:
|
|
83
|
-
|
|
84
|
-
strokeColor: "#B0C8F9",
|
|
75
|
+
fill: "white",
|
|
76
|
+
stroke: "#B0C8F9",
|
|
85
77
|
lineWidth: .5
|
|
86
78
|
},
|
|
87
79
|
endHandlerStyle: {
|
|
88
80
|
symbolType: "M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z",
|
|
89
|
-
fill:
|
|
90
|
-
|
|
91
|
-
strokeColor: "#B0C8F9",
|
|
81
|
+
fill: "white",
|
|
82
|
+
stroke: "#B0C8F9",
|
|
92
83
|
lineWidth: .5
|
|
93
84
|
},
|
|
94
85
|
startTextStyle: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["data-zoom/config.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,kDAA6B,CAAA;IAC7B,8CAAyB,CAAA;IACzB,oDAA+B,CAAA;IAC/B,8CAAyB,CA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M,EAAE,SAAS;YACjB,SAAS,EAAE,CAAC;SACb;KACF;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,KAAK;QACd,UAAU,EAAE;YACV,IAAI,EAAE,CAAC;YACP,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,SAAS;gBACjB,YAAY,EAAE,CAAC;aAChB;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,SAAS;YACjB,UAAU,EAER,8PAA8P;YAChQ,SAAS,EAAE,GAAG;SACf;KACF;IACD,iBAAiB,EAAE;QACjB,UAAU,EAER,yiBAAyiB;QAE3iB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,GAAG;KACf;IACD,eAAe,EAAE;QACf,UAAU,EAER,yiBAAyiB;QAE3iB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,GAAG;KACf;IACD,cAAc,EAAE;QACd,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;SAChB;KACF;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;SAChB;KACF;CACF,CAAC","file":"config.js","sourcesContent":["export enum DataZoomActiveTag {\n startHandler = 'startHandler',\n endHandler = 'endHandler',\n middleHandler = 'middleHandler',\n background = 'background'\n}\nexport const DEFAULT_DATA_ZOOM_ATTRIBUTES = {\n orient: 'bottom',\n showDetail: 'auto',\n brushSelect: true,\n backgroundStyle: {\n fill: 'white',\n stroke: '#D1DBEE',\n lineWidth: 1,\n borderRadius: 2\n },\n dragMaskStyle: {\n fill: '#B0C8F9',\n fillOpacity: 0.2\n },\n backgroundChartStyle: {\n area: {\n visible: true,\n stroke: '#D1DBEE',\n lineWidth: 1,\n fill: '#F6F8FC'\n },\n line: {\n visible: true,\n stroke: '#D1DBEE',\n lineWidth: 1\n }\n },\n selectedBackgroundStyle: {\n fill: '#B0C8F9',\n fillOpacity: 0.5\n },\n selectedBackgroundChartStyle: {\n area: {\n visible: true,\n stroke: '#B0C8F9',\n lineWidth: 1,\n fill: '#fbb934'\n },\n line: {\n visible: true,\n stroke: '#fbb934',\n lineWidth: 1\n }\n },\n middleHandlerStyle: {\n visible: false,\n background: {\n size: 8,\n style: {\n fill: 'white',\n stroke: '#B0C8F9',\n borderRadius: 2\n }\n },\n icon: {\n size: 6,\n fill: 'white',\n stroke: '#B0C8F9',\n symbolType:\n // eslint-disable-next-line max-len\n 'M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z',\n lineWidth: 0.5\n }\n },\n startHandlerStyle: {\n symbolType:\n // eslint-disable-next-line max-len\n 'M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z',\n // size: 40,\n fill: 'white',\n stroke: '#B0C8F9',\n lineWidth: 0.5\n },\n endHandlerStyle: {\n symbolType:\n // eslint-disable-next-line max-len\n 'M -0.0544 0.25 C -0.0742 0.25 -0.0901 0.234 -0.0901 0.2143 L -0.0901 -0.1786 C -0.0901 -0.1983 -0.0742 -0.2143 -0.0544 -0.2143 L -0.0187 -0.2143 L -0.0187 -0.5 L 0.017 -0.5 L 0.017 -0.2143 L 0.0527 -0.2143 C 0.0724 -0.2143 0.0884 -0.1983 0.0884 -0.1786 L 0.0884 0.2143 C 0.0884 0.234 0.0724 0.25 0.0527 0.25 L 0.017 0.25 L 0.017 0.5 L -0.0187 0.5 L -0.0187 0.25 L -0.0544 0.25 Z M -0.0187 -0.1429 L -0.0544 -0.1429 L -0.0544 0.1786 L -0.0187 0.1786 L -0.0187 -0.1429 Z M 0.0527 -0.1429 L 0.017 -0.1429 L 0.017 0.1786 L 0.0527 0.1786 L 0.0527 -0.1429 Z',\n // size: 40,\n fill: 'white',\n stroke: '#B0C8F9',\n lineWidth: 0.5\n },\n startTextStyle: {\n padding: 4,\n textStyle: {\n fontSize: 10,\n fill: '#6F6F6F'\n }\n },\n endTextStyle: {\n padding: 4,\n textStyle: {\n fontSize: 10,\n fill: '#6F6F6F'\n }\n }\n};\n"]}
|
|
@@ -10,47 +10,42 @@ export declare class DataZoom extends AbstractComponent<Required<DataZoomAttribu
|
|
|
10
10
|
showDetail: string;
|
|
11
11
|
brushSelect: boolean;
|
|
12
12
|
backgroundStyle: {
|
|
13
|
-
fill:
|
|
14
|
-
|
|
15
|
-
strokeColor: string;
|
|
13
|
+
fill: string;
|
|
14
|
+
stroke: string;
|
|
16
15
|
lineWidth: number;
|
|
17
16
|
borderRadius: number;
|
|
18
17
|
};
|
|
19
18
|
dragMaskStyle: {
|
|
20
|
-
fill:
|
|
21
|
-
fillColor: string;
|
|
19
|
+
fill: string;
|
|
22
20
|
fillOpacity: number;
|
|
23
21
|
};
|
|
24
22
|
backgroundChartStyle: {
|
|
25
23
|
area: {
|
|
26
24
|
visible: boolean;
|
|
27
|
-
|
|
25
|
+
stroke: string;
|
|
28
26
|
lineWidth: number;
|
|
29
|
-
|
|
30
|
-
fill: boolean;
|
|
27
|
+
fill: string;
|
|
31
28
|
};
|
|
32
29
|
line: {
|
|
33
30
|
visible: boolean;
|
|
34
|
-
|
|
31
|
+
stroke: string;
|
|
35
32
|
lineWidth: number;
|
|
36
33
|
};
|
|
37
34
|
};
|
|
38
35
|
selectedBackgroundStyle: {
|
|
39
|
-
fill:
|
|
40
|
-
fillColor: string;
|
|
36
|
+
fill: string;
|
|
41
37
|
fillOpacity: number;
|
|
42
38
|
};
|
|
43
39
|
selectedBackgroundChartStyle: {
|
|
44
40
|
area: {
|
|
45
41
|
visible: boolean;
|
|
46
|
-
|
|
42
|
+
stroke: string;
|
|
47
43
|
lineWidth: number;
|
|
48
|
-
|
|
49
|
-
fill: boolean;
|
|
44
|
+
fill: string;
|
|
50
45
|
};
|
|
51
46
|
line: {
|
|
52
47
|
visible: boolean;
|
|
53
|
-
|
|
48
|
+
stroke: string;
|
|
54
49
|
lineWidth: number;
|
|
55
50
|
};
|
|
56
51
|
};
|
|
@@ -59,33 +54,29 @@ export declare class DataZoom extends AbstractComponent<Required<DataZoomAttribu
|
|
|
59
54
|
background: {
|
|
60
55
|
size: number;
|
|
61
56
|
style: {
|
|
62
|
-
fill:
|
|
63
|
-
|
|
64
|
-
strokeColor: string;
|
|
57
|
+
fill: string;
|
|
58
|
+
stroke: string;
|
|
65
59
|
borderRadius: number;
|
|
66
60
|
};
|
|
67
61
|
};
|
|
68
62
|
icon: {
|
|
69
63
|
size: number;
|
|
70
|
-
fill:
|
|
71
|
-
|
|
72
|
-
strokeColor: string;
|
|
64
|
+
fill: string;
|
|
65
|
+
stroke: string;
|
|
73
66
|
symbolType: string;
|
|
74
67
|
lineWidth: number;
|
|
75
68
|
};
|
|
76
69
|
};
|
|
77
70
|
startHandlerStyle: {
|
|
78
71
|
symbolType: string;
|
|
79
|
-
fill:
|
|
80
|
-
|
|
81
|
-
strokeColor: string;
|
|
72
|
+
fill: string;
|
|
73
|
+
stroke: string;
|
|
82
74
|
lineWidth: number;
|
|
83
75
|
};
|
|
84
76
|
endHandlerStyle: {
|
|
85
77
|
symbolType: string;
|
|
86
|
-
fill:
|
|
87
|
-
|
|
88
|
-
strokeColor: string;
|
|
78
|
+
fill: string;
|
|
79
|
+
stroke: string;
|
|
89
80
|
lineWidth: number;
|
|
90
81
|
};
|
|
91
82
|
startTextStyle: {
|
package/cjs/data-zoom/type.js
CHANGED
package/cjs/indicator/config.js
CHANGED
|
@@ -7,8 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
style: {
|
|
8
8
|
text: "",
|
|
9
9
|
fontSize: 20,
|
|
10
|
-
fill:
|
|
11
|
-
fillColor: "black",
|
|
10
|
+
fill: "black",
|
|
12
11
|
fontWeight: "normal",
|
|
13
12
|
fillOpacity: 1,
|
|
14
13
|
textBaseline: "top",
|
|
@@ -19,8 +18,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
19
18
|
style: {
|
|
20
19
|
text: "",
|
|
21
20
|
fontSize: 16,
|
|
22
|
-
fill:
|
|
23
|
-
fillColor: "black",
|
|
21
|
+
fill: "black",
|
|
24
22
|
fontWeight: "normal",
|
|
25
23
|
fillOpacity: 1,
|
|
26
24
|
textBaseline: "top",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["indicator/config.ts"],"names":[],"mappings":";;;AACa,QAAA,uBAAuB,GAAiC;IACnE,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,
|
|
1
|
+
{"version":3,"sources":["indicator/config.ts"],"names":[],"mappings":";;;AACa,QAAA,uBAAuB,GAAiC;IACnE,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE;YACL,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC","file":"config.js","sourcesContent":["import { IndicatorAttributes } from './type';\nexport const DEFAULT_INDICATOR_THEME: Partial<IndicatorAttributes> = {\n title: {\n style: {\n text: '',\n fontSize: 20,\n fill: 'black',\n fontWeight: 'normal',\n fillOpacity: 1,\n textBaseline: 'top',\n textAlign: 'center'\n }\n },\n content: {\n style: {\n text: '',\n fontSize: 16,\n fill: 'black',\n fontWeight: 'normal',\n fillOpacity: 1,\n textBaseline: 'top',\n textAlign: 'center'\n }\n }\n};\n"]}
|
package/cjs/indicator/type.js
CHANGED
package/cjs/label/base.js
CHANGED
|
@@ -236,14 +236,14 @@ class LabelBase extends base_1.AbstractComponent {
|
|
|
236
236
|
const text = (0, vrender_1.createText)(label);
|
|
237
237
|
text.update(), isInside = (0, overlap_1.canPlaceInside)(text.AABBBounds, null === (_a = this._relationMap.get(label._relatedIndex)) || void 0 === _a ? void 0 : _a.AABBBounds);
|
|
238
238
|
}
|
|
239
|
-
if (label.stroke) label.
|
|
240
|
-
const backgroundColor = this._relationMap.get(label._relatedIndex).attribute.
|
|
241
|
-
label.
|
|
239
|
+
if (label.stroke && label.lineWidth > 0) label.fill = (0, labelSmartInvert_1.labelSmartInvert)(label.fill, label.stroke, null === (_b = this.attribute.smartInvert) || void 0 === _b ? void 0 : _b.textType, null === (_c = this.attribute.smartInvert) || void 0 === _c ? void 0 : _c.contrastRatiosThreshold, null === (_d = this.attribute.smartInvert) || void 0 === _d ? void 0 : _d.alternativeColors); else if (isInside) {
|
|
240
|
+
const backgroundColor = this._relationMap.get(label._relatedIndex).attribute.fill, foregroundColor = label.fill;
|
|
241
|
+
label.fill = (0, labelSmartInvert_1.labelSmartInvert)(foregroundColor, backgroundColor, null === (_e = this.attribute.smartInvert) || void 0 === _e ? void 0 : _e.textType, null === (_f = this.attribute.smartInvert) || void 0 === _f ? void 0 : _f.contrastRatiosThreshold, null === (_g = this.attribute.smartInvert) || void 0 === _g ? void 0 : _g.alternativeColors);
|
|
242
242
|
} else if (label.lineWidth > 0) {
|
|
243
243
|
const baseMark = this._relationMap.get(label._relatedIndex);
|
|
244
|
-
label.stroke =
|
|
245
|
-
const backgroundColor = label.
|
|
246
|
-
label.
|
|
244
|
+
label.stroke = baseMark.attribute.fill;
|
|
245
|
+
const backgroundColor = label.stroke, foregroundColor = label.fill;
|
|
246
|
+
label.fill = (0, labelSmartInvert_1.labelSmartInvert)(foregroundColor, backgroundColor, null === (_h = this.attribute.smartInvert) || void 0 === _h ? void 0 : _h.textType, null === (_j = this.attribute.smartInvert) || void 0 === _j ? void 0 : _j.contrastRatiosThreshold, null === (_k = this.attribute.smartInvert) || void 0 === _k ? void 0 : _k.alternativeColors);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
}
|
package/cjs/label/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["label/base.ts"],"names":[],"mappings":";;;AAGA,+CAS2B;AAC3B,6CAAmF;AACnF,uCAAiD;AAEjD,+DAA4D;AAC5D,kCAAwC;AACxC,0CAAyC;AACzC,uCAA8F;AAE9F,+CAAkF;AAElF,MAAsB,SAAoC,SAAQ,wBAAoB;IAAtF;;QACE,SAAI,GAAG,OAAO,CAAC;QA0EP,aAAQ,GAAG,CAAC,CAAwB,EAAE,EAAE;YAC9C,MAAM,MAAM,GAAG,CAAC,CAA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AAQ,EACpC,MAAA,IAAI,CAAC,SAAS,CAAC,WAAW,0CAAE,uBAAuB,EACnD,MAAA,IAAI,CAAC,SAAS,CAAC,WAAW,0CAAE,iBAAiB,CAC9C,CAAC;aACH;SACF;IACH,CAAC;IAED,WAAW,CAAC,KAAuB;QACjC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,eAAe;QACb,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC/B,CAAC;CACF;AAnjBD,8BAmjBC","file":"base.js","sourcesContent":["/**\n * @description Label 基类\n */\nimport {\n IGroup,\n Text,\n createText,\n IGraphic,\n IText,\n IncreaseCount,\n AttributeUpdateType,\n FederatedPointerEvent\n} from '@visactor/vrender';\nimport { isFunction, IBoundsLike, isValidNumber, isEmpty } from '@visactor/vutils';\nimport { AbstractComponent } from '../core/base';\nimport { PointLocationCfg } from '../core/type';\nimport { labelSmartInvert } from '../util/labelSmartInvert';\nimport { traverseGroup } from '../util';\nimport { StateValue } from '../constant';\nimport { Bitmap, bitmapTool, boundToRange, canPlace, canPlaceInside, place } from './overlap';\nimport { BaseLabelAttrs, OverlapAttrs, ILabelGraphicAttribute, ILabelAnimation } from './type';\nimport { DefaultLabelAnimation, getAnimationAttributes } from './animate/animate';\n\nexport abstract class LabelBase<T extends BaseLabelAttrs> extends AbstractComponent<T> {\n name = 'label';\n\n protected _baseMarks?: IGraphic[];\n\n protected _bitmap?: Bitmap;\n\n setBitmap(bitmap: Bitmap) {\n this._bitmap = bitmap;\n }\n\n protected _bmpTool?: ReturnType<typeof bitmapTool>;\n setBitmapTool(bmpTool: ReturnType<typeof bitmapTool>) {\n this._bmpTool = bmpTool;\n }\n\n protected _relationMap: Map<number, IGraphic>;\n\n protected _prevRelationMap: Map<number, IGraphic>;\n\n protected _textMap: Map<IGraphic, IText>;\n\n onAfterLabelOverlap?: (bitmap: Bitmap) => void;\n\n private _lastHover: IGraphic;\n private _lastSelect: IGraphic;\n\n private _enableAnimation: boolean;\n\n protected abstract labeling(\n textBounds: IBoundsLike,\n graphicBounds: IBoundsLike,\n position?: BaseLabelAttrs['position'],\n offset?: number\n ): Partial<ILabelGraphicAttribute> | undefined;\n\n protected render() {\n const currentBaseMarks = this._checkMarks();\n const labels = this.layout(currentBaseMarks);\n\n this._smartInvert(labels);\n\n this._renderLabels(labels);\n }\n\n private _bindEvent(target: IGraphic) {\n if (!target) {\n return;\n }\n\n const { hover, select } = this.attribute;\n\n if (hover) {\n target.addEventListener('pointermove', this._onHover as EventListenerOrEventListenerObject);\n target.addEventListener('pointerout', this._onUnHover as EventListenerOrEventListenerObject);\n }\n\n if (select) {\n target.addEventListener('pointerdown', this._onClick as EventListenerOrEventListenerObject);\n }\n }\n\n private _setStates(target: IGraphic) {\n if (!target) {\n return;\n }\n const state = this.attribute.state;\n\n if (!state || isEmpty(state)) {\n return;\n }\n\n target.states = state;\n }\n\n private _onHover = (e: FederatedPointerEvent) => {\n const target = e.target as unknown as IGraphic;\n if (target !== this._lastHover && !isEmpty(target.states)) {\n target.addState(StateValue.hover, true);\n traverseGroup(this as unknown as IGraphic, (node: IGraphic) => {\n if (node !== target && !isEmpty(node.states)) {\n node.addState(StateValue.hoverReverse, true);\n }\n });\n this._lastHover = target;\n }\n };\n\n private _onUnHover = (e: FederatedPointerEvent) => {\n if (this._lastHover) {\n traverseGroup(this as unknown as IGraphic, (node: IGraphic) => {\n if (!isEmpty(node.states)) {\n node.removeState(StateValue.hoverReverse);\n node.removeState(StateValue.hover);\n }\n });\n this._lastHover = null;\n }\n };\n\n private _onClick = (e: FederatedPointerEvent) => {\n const target = e.target as unknown as IGraphic;\n if (this._lastSelect === target && target.hasState('selected')) {\n // 取消选中\n this._lastSelect = null;\n traverseGroup(this as unknown as IGraphic, (node: IGraphic) => {\n if (!isEmpty(node.states)) {\n node.removeState(StateValue.selectedReverse);\n node.removeState(StateValue.selected);\n }\n });\n return;\n }\n\n if (!isEmpty(target.states)) {\n target.addState(StateValue.selected, true);\n traverseGroup(this as unknown as IGraphic, (node: IGraphic) => {\n if (node !== target && !isEmpty(node.states)) {\n node.addState(StateValue.selectedReverse, true);\n }\n });\n this._lastSelect = target;\n }\n };\n\n private _createLabelText(attributes: ILabelGraphicAttribute) {\n const text = createText(attributes);\n this._bindEvent(text);\n this._setStates(text);\n return text;\n }\n\n private _checkMarks() {\n const baseMarks = this.getBaseMarks();\n const currentBaseMarks: IGraphic[] = [];\n baseMarks.forEach(mark => {\n if ((mark as any).releaseStatus !== 'willRelease') {\n currentBaseMarks.push(mark);\n }\n });\n this._prevRelationMap = new Map(this._relationMap);\n this._relationMap?.clear();\n return currentBaseMarks;\n }\n\n protected layout(currentMarks?: IGraphic[]): ILabelGraphicAttribute[] {\n const { textStyle, position, offset } = this.attribute as BaseLabelAttrs;\n let { data } = this.attribute as BaseLabelAttrs;\n if (isFunction(data)) {\n data = data({});\n }\n if (!data || data.length === 0) {\n return [];\n }\n\n let labels: ILabelGraphicAttribute[] = [];\n\n if (isFunction(this.attribute.sort) && currentMarks && currentMarks.length) {\n currentMarks = currentMarks.sort(this.attribute.sort);\n }\n\n if (!this._relationMap) {\n this._relationMap = new Map();\n }\n\n // 默认根据 index 顺序排序\n for (let i = 0; i < data.length; i++) {\n const textData = data[i];\n const baseMark = currentMarks?.[i] as IGraphic;\n const labelAttribute = {\n ...textStyle,\n ...textData,\n _relatedIndex: i\n };\n this._relationMap.set(i, baseMark);\n\n if (textData) {\n const text = createText(labelAttribute);\n text.update();\n const textBounds = this.getGraphicBounds(text);\n const graphicBounds = this.getGraphicBounds(baseMark, { x: textData.x as number, y: textData.y as number });\n\n const textAttributes = this.labeling(\n textBounds,\n graphicBounds,\n isFunction(position) ? position(textData) : position,\n offset\n );\n\n if (!textAttributes) {\n continue;\n }\n\n labelAttribute.x = textAttributes.x;\n labelAttribute.y = textAttributes.y;\n\n labels.push(labelAttribute);\n }\n }\n\n this._baseMarks = currentMarks as IGraphic[];\n if (this.attribute.overlap !== false) {\n labels = this.overlapping(labels, this.attribute.overlap as OverlapAttrs);\n }\n\n return labels;\n }\n\n protected overlapping(labels: ILabelGraphicAttribute[], option: OverlapAttrs = {}) {\n if (labels.length === 0) {\n return [];\n }\n const result: ILabelGraphicAttribute[] = [];\n const baseMarkGroup = this.getBaseMarkGroup();\n const size = option.size ?? {\n width: baseMarkGroup?.AABBBounds.width() ?? 0,\n height: baseMarkGroup?.AABBBounds.height() ?? 0\n };\n\n if (size.width === 0 || size.height === 0) {\n return labels;\n }\n\n const { avoidBaseMark, strategy = [], hideOnHit = true, clampForce = true } = option;\n const bmpTool = this._bmpTool || bitmapTool(size.width, size.height);\n const bitmap = this._bitmap || bmpTool.bitmap();\n const checkBounds = strategy.some(s => s.type === 'bound');\n\n if (avoidBaseMark) {\n this._baseMarks?.forEach(mark => {\n mark.AABBBounds && bitmap.setRange(boundToRange(bmpTool, mark.AABBBounds));\n });\n }\n\n for (let i = 0; i < labels.length; i++) {\n if (labels[i].visible === false) {\n continue;\n }\n const text = createText(labels[i]) as Text;\n const baseMark = this._baseMarks?.[i];\n text.update();\n\n // 默认位置可以放置\n if (canPlace(bmpTool, bitmap, text.AABBBounds, clampForce)) {\n // 如果配置了限制在图形内部,需要提前判断;\n if (!checkBounds) {\n bitmap.setRange(boundToRange(bmpTool, text.AABBBounds));\n result.push({\n ...text.attribute,\n _insideGraphic: canPlaceInside(text.AABBBounds, baseMark?.AABBBounds),\n _computedBound: text.AABBBounds\n });\n continue;\n }\n\n if (checkBounds && baseMark?.AABBBounds && canPlaceInside(text.AABBBounds, baseMark?.AABBBounds)) {\n bitmap.setRange(boundToRange(bmpTool, text.AABBBounds));\n result.push({ ...text.attribute, _insideGraphic: true, _computedBound: text.AABBBounds });\n continue;\n }\n }\n\n // 发生碰撞,根据策略寻找可放置的位置\n for (let j = 0; j < strategy.length; j++) {\n const hasPlace = place(\n bmpTool,\n bitmap,\n strategy[j],\n <BaseLabelAttrs>this.attribute,\n text,\n this.getGraphicBounds(baseMark, labels[i]),\n this.labeling\n );\n if (hasPlace) {\n result.push({\n ...text.attribute,\n _insideGraphic: canPlaceInside(text.AABBBounds, baseMark?.AABBBounds),\n _computedBound: text.AABBBounds\n });\n break;\n }\n }\n\n !hideOnHit &&\n result.push({\n ...text.attribute,\n _insideGraphic: canPlaceInside(text.AABBBounds, baseMark?.AABBBounds),\n _computedBound: text.AABBBounds\n });\n }\n\n if (isFunction(this.onAfterLabelOverlap)) {\n this.onAfterLabelOverlap(bitmap);\n }\n\n return result;\n }\n\n protected getBaseMarks() {\n const baseMarkGroup = this.getBaseMarkGroup() as IGroup;\n if (!baseMarkGroup) {\n return;\n }\n return baseMarkGroup.getChildren() as IGraphic[];\n }\n\n protected getBaseMarkGroup() {\n const { baseMarkGroupName } = this.attribute as BaseLabelAttrs;\n if (!baseMarkGroupName) {\n return;\n }\n return (this.getRootNode() as IGroup).find(node => node.name === baseMarkGroupName, true) as IGroup;\n }\n\n protected getGraphicBounds(graphic?: IGraphic, point: Partial<PointLocationCfg> = {}): IBoundsLike {\n // if (graphic && !isEmpty((graphic as any).finalAttrs)) {\n // const g = graphic.clone();\n // g.onBeforeAttributeUpdate = graphic.onBeforeAttributeUpdate;\n // g.setAttributes((graphic as any).finalAttrs);\n // g.update();\n // return g.AABBBounds;\n // }\n return (\n graphic?.AABBBounds ||\n ({\n x1: point.x,\n x2: point.x,\n y1: point.y,\n y2: point.y\n } as IBoundsLike)\n );\n }\n\n protected _renderLabels(labels: ILabelGraphicAttribute[]) {\n const animationConfig = (this.attribute.animation ?? {}) as ILabelAnimation;\n const disableAnimation = this._enableAnimation === false || (animationConfig as unknown as boolean) === false;\n const mode = animationConfig.mode ?? DefaultLabelAnimation.mode;\n const duration = animationConfig.duration ?? DefaultLabelAnimation.duration;\n const easing = animationConfig.easing ?? DefaultLabelAnimation.easing;\n const delay = animationConfig.delay ?? 0;\n\n const currentTextMap = new Map();\n const prevTextMap = this._textMap || new Map();\n const texts = [] as IText[];\n\n labels.forEach((label, index) => {\n const text = this._createLabelText(label);\n const relatedGraphic = this._relationMap.get(label._relatedIndex);\n const state = prevTextMap?.get(relatedGraphic) ? 'update' : 'enter';\n\n if (state === 'enter') {\n texts.push(text);\n currentTextMap.set(relatedGraphic, text);\n if (!disableAnimation && relatedGraphic) {\n const { from, to } = getAnimationAttributes(label, 'fadeIn');\n this.add(text);\n relatedGraphic.onAnimateBind = () => {\n text.setAttributes(from);\n const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, {\n mode,\n duration,\n easing,\n to,\n delay\n });\n relatedGraphic.on('afterAttributeUpdate', listener);\n };\n } else {\n this.add(text);\n }\n }\n\n if (state === 'update') {\n const prevText = prevTextMap.get(relatedGraphic);\n prevTextMap.delete(relatedGraphic);\n currentTextMap.set(relatedGraphic, prevText);\n if (!disableAnimation) {\n prevText.animate().to(text.attribute, duration, easing);\n if (\n animationConfig.increaseEffect !== false &&\n prevText.attribute.text !== text.attribute.text &&\n isValidNumber(Number(prevText.attribute.text) * Number(text.attribute.text))\n ) {\n prevText\n .animate()\n .play(\n new IncreaseCount(\n { text: prevText.attribute.text as string },\n { text: text.attribute.text as string },\n duration,\n easing\n )\n );\n }\n } else {\n prevText.setAttributes(text.attribute);\n }\n }\n });\n prevTextMap.forEach(label => {\n if (disableAnimation) {\n this.removeChild(label);\n } else {\n label\n ?.animate()\n .to(getAnimationAttributes(label.attribute, 'fadeOut').to, duration, easing)\n .onEnd(() => {\n this.removeChild(label);\n });\n }\n });\n\n this._textMap = currentTextMap;\n }\n\n protected _afterRelatedGraphicAttributeUpdate(\n text: IText,\n texts: IText[],\n index: number,\n relatedGraphic: IGraphic,\n { mode, duration, easing, to, delay }: ILabelAnimation & { to: any }\n ) {\n const listener = (event: any) => {\n const { detail } = event;\n if (!detail) {\n return {};\n }\n\n const isValidAnimateState =\n detail &&\n detail.type === AttributeUpdateType.ANIMATE_UPDATE &&\n detail.animationState &&\n detail.animationState.step?.type !== 'wait';\n\n if (!isValidAnimateState) {\n return {};\n }\n\n if (detail.type === AttributeUpdateType.ANIMATE_END) {\n text.setAttributes(to);\n return;\n }\n\n const onEnd = () => {\n if (relatedGraphic) {\n relatedGraphic.onAnimateBind = undefined;\n relatedGraphic.removeEventListener('afterAttributeUpdate', listener);\n }\n };\n\n switch (mode) {\n case 'after':\n // 3. 当前关联图元的动画播放结束后\n if (detail.animationState.end) {\n text.animate({ onEnd }).wait(delay).to(to, duration, easing);\n }\n break;\n case 'after-all':\n // 2. 所有完成后才开始;\n if (index === texts.length - 1) {\n if (detail.animationState.end) {\n texts.forEach(t => {\n t.animate({ onEnd }).wait(delay).to(to, duration, easing);\n });\n }\n }\n break;\n case 'same-time':\n default:\n // 1. 与当前关联图元的动画播放同时进行\n if (detail.animationState.isFirstFrameOfStep) {\n text.animate({ onEnd }).wait(delay).to(to, duration, easing);\n }\n break;\n }\n };\n return listener;\n }\n\n protected _smartInvert(labels: ILabelGraphicAttribute[]) {\n if (this.attribute.smartInvert === false) {\n return;\n }\n for (let i = 0; i < labels.length; i++) {\n const label = labels?.[i] as ILabelGraphicAttribute;\n if (!label) {\n continue;\n }\n let isInside = label._insideGraphic;\n if (isInside === undefined) {\n const text = createText(label);\n text.update();\n isInside = canPlaceInside(text.AABBBounds, this._relationMap.get(label._relatedIndex)?.AABBBounds);\n }\n /**\n * stroke 的处理逻辑\n * 1. 当文本在图元内部时,有两种情况:\n * - a. 未设置stroke:labelFill为前景色,baseMark填充色为背景色\n * - b. 设置了stroke:labelFill为前景色,labelStroke填充色为背景色\n * 2. 当文本在图元外部时,有两种情况:\n * - a. 未设置stroke:此时设置strokeColor为backgroundColor。labelFill为前景色,labelStroke填充色为背景色。避免文字一半在图元内部,一半在图元外部时,在图元外部文字不可见。\n * - b. 设置了stroke:保持strokeColor。labelFill为前景色,labelStroke填充色为背景色。\n */\n if (label.stroke) {\n /**\n * 1-b, 2-b\n * 若label存在stroke,label填充色为前景色,label描边色为背景色\n * WCAG 2 字母周围的文本发光/光晕可用作背景颜色\n */\n label.fillColor = labelSmartInvert(\n label.fillColor,\n label.strokeColor,\n this.attribute.smartInvert?.textType,\n this.attribute.smartInvert?.contrastRatiosThreshold,\n this.attribute.smartInvert?.alternativeColors\n );\n } else if (isInside) {\n /**\n * 1-a\n * label在图元内部时,label填充色为前景色,baseMark填充色为背景色\n */\n const baseMark = this._relationMap.get(label._relatedIndex);\n const backgroundColor = baseMark.attribute.fillColor;\n const foregroundColor = label.fillColor;\n label.fillColor = labelSmartInvert(\n foregroundColor,\n backgroundColor,\n this.attribute.smartInvert?.textType,\n this.attribute.smartInvert?.contrastRatiosThreshold,\n this.attribute.smartInvert?.alternativeColors\n );\n } else if (label.lineWidth > 0) {\n /**\n * 2-a\n * 当文本在图元外部时,设置strokeColor为backgroundColor。labelFill为前景色,labelStroke填充色为背景色。\n */\n const baseMark = this._relationMap.get(label._relatedIndex);\n label.stroke = true;\n label.strokeColor = baseMark.attribute.fillColor;\n const backgroundColor = label.strokeColor;\n const foregroundColor = label.fillColor;\n label.fillColor = labelSmartInvert(\n foregroundColor,\n backgroundColor,\n this.attribute.smartInvert?.textType,\n this.attribute.smartInvert?.contrastRatiosThreshold,\n this.attribute.smartInvert?.alternativeColors\n );\n }\n }\n }\n\n setLocation(point: PointLocationCfg) {\n this.translateTo(point.x, point.y);\n }\n\n disableAnimation() {\n this._enableAnimation = false;\n }\n\n enableAnimation() {\n this._enableAnimation = true;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["label/base.ts"],"names":[],"mappings":";;;AAGA,+CAU2B;AAC3B,6CAAmF;AACnF,uCAAiD;AAEjD,+DAA4D;AAC5D,kCAAwC;AACxC,0CAAyC;AACzC,uCAA8F;AAE9F,+CAAkF;AAElF,MAAsB,SAAoC,SAAQ,wBAAoB;IAAtF;;QACE,SAAI,GAAG,OAAO,CAAC;QA0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AAgB,EAC3B,eAAe,EACf,eAAe,EACf,MAAA,IAAI,CAAC,SAAS,CAAC,WAAW,0CAAE,QAAQ,EACpC,MAAA,IAAI,CAAC,SAAS,CAAC,WAAW,0CAAE,uBAAuB,EACnD,MAAA,IAAI,CAAC,SAAS,CAAC,WAAW,0CAAE,iBAAiB,CAC9C,CAAC;aACH;SACF;IACH,CAAC;IAED,WAAW,CAAC,KAAuB;QACjC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,eAAe;QACb,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC/B,CAAC;CACF;AAljBD,8BAkjBC","file":"base.js","sourcesContent":["/**\n * @description Label 基类\n */\nimport {\n IGroup,\n Text,\n createText,\n IGraphic,\n IText,\n IncreaseCount,\n AttributeUpdateType,\n FederatedPointerEvent,\n IColor\n} from '@visactor/vrender';\nimport { isFunction, IBoundsLike, isValidNumber, isEmpty } from '@visactor/vutils';\nimport { AbstractComponent } from '../core/base';\nimport { PointLocationCfg } from '../core/type';\nimport { labelSmartInvert } from '../util/labelSmartInvert';\nimport { traverseGroup } from '../util';\nimport { StateValue } from '../constant';\nimport { Bitmap, bitmapTool, boundToRange, canPlace, canPlaceInside, place } from './overlap';\nimport { BaseLabelAttrs, OverlapAttrs, ILabelGraphicAttribute, ILabelAnimation } from './type';\nimport { DefaultLabelAnimation, getAnimationAttributes } from './animate/animate';\n\nexport abstract class LabelBase<T extends BaseLabelAttrs> extends AbstractComponent<T> {\n name = 'label';\n\n protected _baseMarks?: IGraphic[];\n\n protected _bitmap?: Bitmap;\n\n setBitmap(bitmap: Bitmap) {\n this._bitmap = bitmap;\n }\n\n protected _bmpTool?: ReturnType<typeof bitmapTool>;\n setBitmapTool(bmpTool: ReturnType<typeof bitmapTool>) {\n this._bmpTool = bmpTool;\n }\n\n protected _relationMap: Map<number, IGraphic>;\n\n protected _prevRelationMap: Map<number, IGraphic>;\n\n protected _textMap: Map<IGraphic, IText>;\n\n onAfterLabelOverlap?: (bitmap: Bitmap) => void;\n\n private _lastHover: IGraphic;\n private _lastSelect: IGraphic;\n\n private _enableAnimation: boolean;\n\n protected abstract labeling(\n textBounds: IBoundsLike,\n graphicBounds: IBoundsLike,\n position?: BaseLabelAttrs['position'],\n offset?: number\n ): Partial<ILabelGraphicAttribute> | undefined;\n\n protected render() {\n const currentBaseMarks = this._checkMarks();\n const labels = this.layout(currentBaseMarks);\n\n this._smartInvert(labels);\n\n this._renderLabels(labels);\n }\n\n private _bindEvent(target: IGraphic) {\n if (!target) {\n return;\n }\n\n const { hover, select } = this.attribute;\n\n if (hover) {\n target.addEventListener('pointermove', this._onHover as EventListenerOrEventListenerObject);\n target.addEventListener('pointerout', this._onUnHover as EventListenerOrEventListenerObject);\n }\n\n if (select) {\n target.addEventListener('pointerdown', this._onClick as EventListenerOrEventListenerObject);\n }\n }\n\n private _setStates(target: IGraphic) {\n if (!target) {\n return;\n }\n const state = this.attribute.state;\n\n if (!state || isEmpty(state)) {\n return;\n }\n\n target.states = state;\n }\n\n private _onHover = (e: FederatedPointerEvent) => {\n const target = e.target as unknown as IGraphic;\n if (target !== this._lastHover && !isEmpty(target.states)) {\n target.addState(StateValue.hover, true);\n traverseGroup(this as unknown as IGraphic, (node: IGraphic) => {\n if (node !== target && !isEmpty(node.states)) {\n node.addState(StateValue.hoverReverse, true);\n }\n });\n this._lastHover = target;\n }\n };\n\n private _onUnHover = (e: FederatedPointerEvent) => {\n if (this._lastHover) {\n traverseGroup(this as unknown as IGraphic, (node: IGraphic) => {\n if (!isEmpty(node.states)) {\n node.removeState(StateValue.hoverReverse);\n node.removeState(StateValue.hover);\n }\n });\n this._lastHover = null;\n }\n };\n\n private _onClick = (e: FederatedPointerEvent) => {\n const target = e.target as unknown as IGraphic;\n if (this._lastSelect === target && target.hasState('selected')) {\n // 取消选中\n this._lastSelect = null;\n traverseGroup(this as unknown as IGraphic, (node: IGraphic) => {\n if (!isEmpty(node.states)) {\n node.removeState(StateValue.selectedReverse);\n node.removeState(StateValue.selected);\n }\n });\n return;\n }\n\n if (!isEmpty(target.states)) {\n target.addState(StateValue.selected, true);\n traverseGroup(this as unknown as IGraphic, (node: IGraphic) => {\n if (node !== target && !isEmpty(node.states)) {\n node.addState(StateValue.selectedReverse, true);\n }\n });\n this._lastSelect = target;\n }\n };\n\n private _createLabelText(attributes: ILabelGraphicAttribute) {\n const text = createText(attributes);\n this._bindEvent(text);\n this._setStates(text);\n return text;\n }\n\n private _checkMarks() {\n const baseMarks = this.getBaseMarks();\n const currentBaseMarks: IGraphic[] = [];\n baseMarks.forEach(mark => {\n if ((mark as any).releaseStatus !== 'willRelease') {\n currentBaseMarks.push(mark);\n }\n });\n this._prevRelationMap = new Map(this._relationMap);\n this._relationMap?.clear();\n return currentBaseMarks;\n }\n\n protected layout(currentMarks?: IGraphic[]): ILabelGraphicAttribute[] {\n const { textStyle, position, offset } = this.attribute as BaseLabelAttrs;\n let { data } = this.attribute as BaseLabelAttrs;\n if (isFunction(data)) {\n data = data({});\n }\n if (!data || data.length === 0) {\n return [];\n }\n\n let labels: ILabelGraphicAttribute[] = [];\n\n if (isFunction(this.attribute.sort) && currentMarks && currentMarks.length) {\n currentMarks = currentMarks.sort(this.attribute.sort);\n }\n\n if (!this._relationMap) {\n this._relationMap = new Map();\n }\n\n // 默认根据 index 顺序排序\n for (let i = 0; i < data.length; i++) {\n const textData = data[i];\n const baseMark = currentMarks?.[i] as IGraphic;\n const labelAttribute = {\n ...textStyle,\n ...textData,\n _relatedIndex: i\n };\n this._relationMap.set(i, baseMark);\n\n if (textData) {\n const text = createText(labelAttribute);\n text.update();\n const textBounds = this.getGraphicBounds(text);\n const graphicBounds = this.getGraphicBounds(baseMark, { x: textData.x as number, y: textData.y as number });\n\n const textAttributes = this.labeling(\n textBounds,\n graphicBounds,\n isFunction(position) ? position(textData) : position,\n offset\n );\n\n if (!textAttributes) {\n continue;\n }\n\n labelAttribute.x = textAttributes.x;\n labelAttribute.y = textAttributes.y;\n\n labels.push(labelAttribute);\n }\n }\n\n this._baseMarks = currentMarks as IGraphic[];\n if (this.attribute.overlap !== false) {\n labels = this.overlapping(labels, this.attribute.overlap as OverlapAttrs);\n }\n\n return labels;\n }\n\n protected overlapping(labels: ILabelGraphicAttribute[], option: OverlapAttrs = {}) {\n if (labels.length === 0) {\n return [];\n }\n const result: ILabelGraphicAttribute[] = [];\n const baseMarkGroup = this.getBaseMarkGroup();\n const size = option.size ?? {\n width: baseMarkGroup?.AABBBounds.width() ?? 0,\n height: baseMarkGroup?.AABBBounds.height() ?? 0\n };\n\n if (size.width === 0 || size.height === 0) {\n return labels;\n }\n\n const { avoidBaseMark, strategy = [], hideOnHit = true, clampForce = true } = option;\n const bmpTool = this._bmpTool || bitmapTool(size.width, size.height);\n const bitmap = this._bitmap || bmpTool.bitmap();\n const checkBounds = strategy.some(s => s.type === 'bound');\n\n if (avoidBaseMark) {\n this._baseMarks?.forEach(mark => {\n mark.AABBBounds && bitmap.setRange(boundToRange(bmpTool, mark.AABBBounds));\n });\n }\n\n for (let i = 0; i < labels.length; i++) {\n if (labels[i].visible === false) {\n continue;\n }\n const text = createText(labels[i]) as Text;\n const baseMark = this._baseMarks?.[i];\n text.update();\n\n // 默认位置可以放置\n if (canPlace(bmpTool, bitmap, text.AABBBounds, clampForce)) {\n // 如果配置了限制在图形内部,需要提前判断;\n if (!checkBounds) {\n bitmap.setRange(boundToRange(bmpTool, text.AABBBounds));\n result.push({\n ...text.attribute,\n _insideGraphic: canPlaceInside(text.AABBBounds, baseMark?.AABBBounds),\n _computedBound: text.AABBBounds\n });\n continue;\n }\n\n if (checkBounds && baseMark?.AABBBounds && canPlaceInside(text.AABBBounds, baseMark?.AABBBounds)) {\n bitmap.setRange(boundToRange(bmpTool, text.AABBBounds));\n result.push({ ...text.attribute, _insideGraphic: true, _computedBound: text.AABBBounds });\n continue;\n }\n }\n\n // 发生碰撞,根据策略寻找可放置的位置\n for (let j = 0; j < strategy.length; j++) {\n const hasPlace = place(\n bmpTool,\n bitmap,\n strategy[j],\n <BaseLabelAttrs>this.attribute,\n text,\n this.getGraphicBounds(baseMark, labels[i]),\n this.labeling\n );\n if (hasPlace) {\n result.push({\n ...text.attribute,\n _insideGraphic: canPlaceInside(text.AABBBounds, baseMark?.AABBBounds),\n _computedBound: text.AABBBounds\n });\n break;\n }\n }\n\n !hideOnHit &&\n result.push({\n ...text.attribute,\n _insideGraphic: canPlaceInside(text.AABBBounds, baseMark?.AABBBounds),\n _computedBound: text.AABBBounds\n });\n }\n\n if (isFunction(this.onAfterLabelOverlap)) {\n this.onAfterLabelOverlap(bitmap);\n }\n\n return result;\n }\n\n protected getBaseMarks() {\n const baseMarkGroup = this.getBaseMarkGroup() as IGroup;\n if (!baseMarkGroup) {\n return;\n }\n return baseMarkGroup.getChildren() as IGraphic[];\n }\n\n protected getBaseMarkGroup() {\n const { baseMarkGroupName } = this.attribute as BaseLabelAttrs;\n if (!baseMarkGroupName) {\n return;\n }\n return (this.getRootNode() as IGroup).find(node => node.name === baseMarkGroupName, true) as IGroup;\n }\n\n protected getGraphicBounds(graphic?: IGraphic, point: Partial<PointLocationCfg> = {}): IBoundsLike {\n // if (graphic && !isEmpty((graphic as any).finalAttrs)) {\n // const g = graphic.clone();\n // g.onBeforeAttributeUpdate = graphic.onBeforeAttributeUpdate;\n // g.setAttributes((graphic as any).finalAttrs);\n // g.update();\n // return g.AABBBounds;\n // }\n return (\n graphic?.AABBBounds ||\n ({\n x1: point.x,\n x2: point.x,\n y1: point.y,\n y2: point.y\n } as IBoundsLike)\n );\n }\n\n protected _renderLabels(labels: ILabelGraphicAttribute[]) {\n const animationConfig = (this.attribute.animation ?? {}) as ILabelAnimation;\n const disableAnimation = this._enableAnimation === false || (animationConfig as unknown as boolean) === false;\n const mode = animationConfig.mode ?? DefaultLabelAnimation.mode;\n const duration = animationConfig.duration ?? DefaultLabelAnimation.duration;\n const easing = animationConfig.easing ?? DefaultLabelAnimation.easing;\n const delay = animationConfig.delay ?? 0;\n\n const currentTextMap = new Map();\n const prevTextMap = this._textMap || new Map();\n const texts = [] as IText[];\n\n labels.forEach((label, index) => {\n const text = this._createLabelText(label);\n const relatedGraphic = this._relationMap.get(label._relatedIndex);\n const state = prevTextMap?.get(relatedGraphic) ? 'update' : 'enter';\n\n if (state === 'enter') {\n texts.push(text);\n currentTextMap.set(relatedGraphic, text);\n if (!disableAnimation && relatedGraphic) {\n const { from, to } = getAnimationAttributes(label, 'fadeIn');\n this.add(text);\n relatedGraphic.onAnimateBind = () => {\n text.setAttributes(from);\n const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, {\n mode,\n duration,\n easing,\n to,\n delay\n });\n relatedGraphic.on('afterAttributeUpdate', listener);\n };\n } else {\n this.add(text);\n }\n }\n\n if (state === 'update') {\n const prevText = prevTextMap.get(relatedGraphic);\n prevTextMap.delete(relatedGraphic);\n currentTextMap.set(relatedGraphic, prevText);\n if (!disableAnimation) {\n prevText.animate().to(text.attribute, duration, easing);\n if (\n animationConfig.increaseEffect !== false &&\n prevText.attribute.text !== text.attribute.text &&\n isValidNumber(Number(prevText.attribute.text) * Number(text.attribute.text))\n ) {\n prevText\n .animate()\n .play(\n new IncreaseCount(\n { text: prevText.attribute.text as string },\n { text: text.attribute.text as string },\n duration,\n easing\n )\n );\n }\n } else {\n prevText.setAttributes(text.attribute);\n }\n }\n });\n prevTextMap.forEach(label => {\n if (disableAnimation) {\n this.removeChild(label);\n } else {\n label\n ?.animate()\n .to(getAnimationAttributes(label.attribute, 'fadeOut').to, duration, easing)\n .onEnd(() => {\n this.removeChild(label);\n });\n }\n });\n\n this._textMap = currentTextMap;\n }\n\n protected _afterRelatedGraphicAttributeUpdate(\n text: IText,\n texts: IText[],\n index: number,\n relatedGraphic: IGraphic,\n { mode, duration, easing, to, delay }: ILabelAnimation & { to: any }\n ) {\n const listener = (event: any) => {\n const { detail } = event;\n if (!detail) {\n return {};\n }\n\n const isValidAnimateState =\n detail &&\n detail.type === AttributeUpdateType.ANIMATE_UPDATE &&\n detail.animationState &&\n detail.animationState.step?.type !== 'wait';\n\n if (!isValidAnimateState) {\n return {};\n }\n\n if (detail.type === AttributeUpdateType.ANIMATE_END) {\n text.setAttributes(to);\n return;\n }\n\n const onEnd = () => {\n if (relatedGraphic) {\n relatedGraphic.onAnimateBind = undefined;\n relatedGraphic.removeEventListener('afterAttributeUpdate', listener);\n }\n };\n\n switch (mode) {\n case 'after':\n // 3. 当前关联图元的动画播放结束后\n if (detail.animationState.end) {\n text.animate({ onEnd }).wait(delay).to(to, duration, easing);\n }\n break;\n case 'after-all':\n // 2. 所有完成后才开始;\n if (index === texts.length - 1) {\n if (detail.animationState.end) {\n texts.forEach(t => {\n t.animate({ onEnd }).wait(delay).to(to, duration, easing);\n });\n }\n }\n break;\n case 'same-time':\n default:\n // 1. 与当前关联图元的动画播放同时进行\n if (detail.animationState.isFirstFrameOfStep) {\n text.animate({ onEnd }).wait(delay).to(to, duration, easing);\n }\n break;\n }\n };\n return listener;\n }\n\n protected _smartInvert(labels: ILabelGraphicAttribute[]) {\n if (this.attribute.smartInvert === false) {\n return;\n }\n for (let i = 0; i < labels.length; i++) {\n const label = labels?.[i] as ILabelGraphicAttribute;\n if (!label) {\n continue;\n }\n let isInside = label._insideGraphic;\n if (isInside === undefined) {\n const text = createText(label);\n text.update();\n isInside = canPlaceInside(text.AABBBounds, this._relationMap.get(label._relatedIndex)?.AABBBounds);\n }\n /**\n * stroke 的处理逻辑\n * 1. 当文本在图元内部时,有两种情况:\n * - a. 未设置stroke:labelFill为前景色,baseMark填充色为背景色\n * - b. 设置了stroke:labelFill为前景色,labelStroke填充色为背景色\n * 2. 当文本在图元外部时,有两种情况:\n * - a. 未设置stroke:此时设置strokeColor为backgroundColor。labelFill为前景色,labelStroke填充色为背景色。避免文字一半在图元内部,一半在图元外部时,在图元外部文字不可见。\n * - b. 设置了stroke:保持strokeColor。labelFill为前景色,labelStroke填充色为背景色。\n */\n if (label.stroke && label.lineWidth > 0) {\n /**\n * 1-b, 2-b\n * 若label存在stroke,label填充色为前景色,label描边色为背景色\n * WCAG 2 字母周围的文本发光/光晕可用作背景颜色\n */\n label.fill = labelSmartInvert(\n label.fill as IColor,\n label.stroke as IColor,\n this.attribute.smartInvert?.textType,\n this.attribute.smartInvert?.contrastRatiosThreshold,\n this.attribute.smartInvert?.alternativeColors\n );\n } else if (isInside) {\n /**\n * 1-a\n * label在图元内部时,label填充色为前景色,baseMark填充色为背景色\n */\n const baseMark = this._relationMap.get(label._relatedIndex);\n const backgroundColor = baseMark.attribute.fill as IColor;\n const foregroundColor = label.fill as IColor;\n label.fill = labelSmartInvert(\n foregroundColor,\n backgroundColor,\n this.attribute.smartInvert?.textType,\n this.attribute.smartInvert?.contrastRatiosThreshold,\n this.attribute.smartInvert?.alternativeColors\n );\n } else if (label.lineWidth > 0) {\n /**\n * 2-a\n * 当文本在图元外部时,设置strokeColor为backgroundColor。labelFill为前景色,labelStroke填充色为背景色。\n */\n const baseMark = this._relationMap.get(label._relatedIndex);\n label.stroke = baseMark.attribute.fill;\n const backgroundColor = label.stroke as IColor;\n const foregroundColor = label.fill as IColor;\n label.fill = labelSmartInvert(\n foregroundColor,\n backgroundColor,\n this.attribute.smartInvert?.textType,\n this.attribute.smartInvert?.contrastRatiosThreshold,\n this.attribute.smartInvert?.alternativeColors\n );\n }\n }\n }\n\n setLocation(point: PointLocationCfg) {\n this.translateTo(point.x, point.y);\n }\n\n disableAnimation() {\n this._enableAnimation = false;\n }\n\n enableAnimation() {\n this._enableAnimation = true;\n }\n}\n"]}
|
package/cjs/label/dataLabel.js
CHANGED
package/cjs/label/line.js
CHANGED
|
@@ -36,9 +36,10 @@ class LineLabel extends base_1.LabelBase {
|
|
|
36
36
|
exports.LineLabel = LineLabel, LineLabel.defaultAttributes = {
|
|
37
37
|
textStyle: {
|
|
38
38
|
fontSize: 12,
|
|
39
|
-
|
|
39
|
+
fill: "#000",
|
|
40
40
|
textAlign: "center",
|
|
41
|
-
textBaseline: "middle"
|
|
41
|
+
textBaseline: "middle",
|
|
42
|
+
boundsPadding: [ -1, 0, -1, 0 ]
|
|
42
43
|
},
|
|
43
44
|
position: "end",
|
|
44
45
|
offset: 6,
|
package/cjs/label/line.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["label/line.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AAItD,iCAAmC;AAEnC,MAAa,SAAU,SAAQ,gBAAyB;
|
|
1
|
+
{"version":3,"sources":["label/line.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AAItD,iCAAmC;AAEnC,MAAa,SAAU,SAAQ,gBAAyB;IAgBtD,YAAY,UAA0B;QACpC,KAAK,CAAC,IAAA,cAAK,EAAC,EAAE,EAAE,SAAS,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;QAhB5D,SAAI,GAAG,YAAY,CAAC;IAiBpB,CAAC;IAES,gBAAgB,CAAC,OAAc,EAAE,QAAmC,EAAE;;QAC9E,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE;YAC3B,OAAO,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SAC/C;QACD,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC;QAC5C,MAAM,MAAM,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,0CAAE,MAAM,KAAI,CAAC,KAAK,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3D,OAAO;YACL,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAW;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AQ,EAAE,KAAK;CAChB,CAAC","file":"line.js","sourcesContent":["import { merge, IBoundsLike } from '@visactor/vutils';\nimport type { ILine } from '@visactor/vrender';\nimport { PointLocationCfg } from '../core/type';\nimport type { LineLabelAttrs } from './type';\nimport { LabelBase } from './base';\n\nexport class LineLabel extends LabelBase<LineLabelAttrs> {\n name = 'line-label';\n\n static defaultAttributes: Partial<LineLabelAttrs> = {\n textStyle: {\n fontSize: 12,\n fill: '#000',\n textAlign: 'center',\n textBaseline: 'middle',\n boundsPadding: [-1, 0, -1, 0] // to ignore the textBound buf\n },\n position: 'end',\n offset: 6,\n pickable: false\n };\n\n constructor(attributes: LineLabelAttrs) {\n super(merge({}, LineLabel.defaultAttributes, attributes));\n }\n\n protected getGraphicBounds(graphic: ILine, point: Partial<PointLocationCfg> = {}) {\n if (graphic.type !== 'line') {\n return super.getGraphicBounds(graphic, point);\n }\n const { position = 'end' } = this.attribute;\n const points = graphic?.attribute?.points || [point];\n const index = position === 'start' ? 0 : points.length - 1;\n return {\n x1: points[index].x as number,\n x2: points[index].x as number,\n y1: points[index].y as number,\n y2: points[index].y as number\n };\n }\n\n protected labeling(\n textBounds: IBoundsLike,\n graphicBounds: IBoundsLike,\n position: LineLabelAttrs['position'] = 'end',\n offset = 0\n ) {\n if (!textBounds || !graphicBounds) {\n return;\n }\n\n const { x1, x2 } = textBounds;\n const width = Math.abs(x2 - x1);\n\n const anchorX = graphicBounds.x1;\n const anchorY = graphicBounds.y1;\n\n let x = anchorX;\n const y = anchorY;\n\n if (position === 'end') {\n x = anchorX + width / 2 + offset;\n } else if (position === 'start') {\n x = anchorX - width / 2 - offset;\n }\n\n return { x, y };\n }\n}\n"]}
|
package/cjs/label/rect.js
CHANGED
|
@@ -48,9 +48,10 @@ class RectLabel extends base_1.LabelBase {
|
|
|
48
48
|
exports.RectLabel = RectLabel, RectLabel.tag = "rect-label", RectLabel.defaultAttributes = {
|
|
49
49
|
textStyle: {
|
|
50
50
|
fontSize: 12,
|
|
51
|
-
|
|
51
|
+
fill: "#000",
|
|
52
52
|
textAlign: "center",
|
|
53
|
-
textBaseline: "middle"
|
|
53
|
+
textBaseline: "middle",
|
|
54
|
+
boundsPadding: [ -1, 0, -1, 0 ]
|
|
54
55
|
},
|
|
55
56
|
position: "top",
|
|
56
57
|
offset: 5,
|