@visactor/vrender-components 0.18.11-alpha.6 → 0.18.11-alpha.7
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/cjs/axis/base.js +9 -21
- package/cjs/axis/base.js.map +1 -1
- package/cjs/axis/circle.js +1 -1
- package/cjs/axis/circle.js.map +1 -1
- package/cjs/axis/grid/base.js +5 -1
- package/cjs/axis/grid/base.js.map +1 -1
- package/cjs/axis/index.d.ts +0 -1
- package/cjs/axis/index.js +1 -1
- package/cjs/axis/index.js.map +1 -1
- package/cjs/axis/line.js +5 -5
- package/cjs/axis/line.js.map +1 -1
- package/cjs/axis/mixin/circle.js +4 -2
- package/cjs/axis/mixin/circle.js.map +1 -1
- package/cjs/axis/overlap/auto-limit.js +13 -8
- package/cjs/axis/overlap/auto-limit.js.map +1 -1
- package/cjs/axis/util.d.ts +2 -5
- package/cjs/axis/util.js +5 -18
- package/cjs/axis/util.js.map +1 -1
- package/cjs/brush/brush.js +9 -11
- package/cjs/brush/brush.js.map +1 -1
- package/cjs/brush/type.js +1 -2
- package/cjs/checkbox/checkbox.d.ts +1 -1
- package/cjs/checkbox/checkbox.js +10 -9
- package/cjs/checkbox/checkbox.js.map +1 -1
- package/cjs/crosshair/polygon.js +2 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/indicator/indicator.js +3 -3
- package/cjs/indicator/indicator.js.map +1 -1
- package/cjs/indicator/type.js +1 -1
- package/cjs/label/arc.d.ts +2 -2
- package/cjs/label/base.d.ts +2 -2
- package/cjs/label/base.js +1 -3
- package/cjs/label/base.js.map +1 -1
- package/cjs/label/index.js +1 -2
- package/cjs/label/type.js +2 -1
- package/cjs/label/util.js +2 -2
- package/cjs/legend/color/color.js +5 -7
- package/cjs/legend/color/color.js.map +1 -1
- package/cjs/legend/discrete/discrete.js +2 -4
- package/cjs/legend/discrete/discrete.js.map +1 -1
- package/cjs/legend/size/size.js +4 -6
- package/cjs/legend/size/size.js.map +1 -1
- package/cjs/marker/animate/animate.d.ts +13 -0
- package/cjs/marker/animate/animate.js +92 -0
- package/cjs/marker/animate/animate.js.map +1 -0
- package/cjs/marker/animate/call-in.d.ts +4 -0
- package/cjs/marker/animate/call-in.js +27 -0
- package/cjs/marker/animate/call-in.js.map +1 -0
- package/cjs/marker/animate/clip-in.d.ts +4 -0
- package/cjs/marker/animate/clip-in.js +23 -0
- package/cjs/marker/animate/clip-in.js.map +1 -0
- package/cjs/marker/animate/common.d.ts +9 -0
- package/cjs/marker/animate/common.js +48 -0
- package/cjs/marker/animate/common.js.map +1 -0
- package/cjs/marker/animate/fade-in.d.ts +7 -0
- package/cjs/marker/animate/fade-in.js +30 -0
- package/cjs/marker/animate/fade-in.js.map +1 -0
- package/cjs/marker/animate/fade-out.d.ts +7 -0
- package/cjs/marker/animate/fade-out.js +30 -0
- package/cjs/marker/animate/fade-out.js.map +1 -0
- package/cjs/marker/animate/index.js +3 -0
- package/cjs/marker/animate/index.js.map +1 -0
- package/cjs/marker/arc-area.d.ts +55 -0
- package/cjs/marker/arc-area.js +131 -0
- package/cjs/marker/arc-area.js.map +1 -0
- package/cjs/marker/arc-line.d.ts +25 -0
- package/cjs/marker/arc-line.js +106 -0
- package/cjs/marker/arc-line.js.map +1 -0
- package/cjs/marker/area.d.ts +14 -4
- package/cjs/marker/area.js +34 -21
- package/cjs/marker/area.js.map +1 -1
- package/cjs/marker/base.d.ts +21 -3
- package/cjs/marker/base.js +40 -5
- package/cjs/marker/base.js.map +1 -1
- package/cjs/marker/common-line.d.ts +22 -0
- package/cjs/marker/common-line.js +56 -0
- package/cjs/marker/common-line.js.map +1 -0
- package/cjs/marker/config.d.ts +79 -6
- package/cjs/marker/config.js +77 -37
- package/cjs/marker/config.js.map +1 -1
- package/cjs/marker/index.d.ts +2 -0
- package/cjs/marker/index.js +2 -1
- package/cjs/marker/index.js.map +1 -1
- package/cjs/marker/line.d.ts +24 -12
- package/cjs/marker/line.js +111 -45
- package/cjs/marker/line.js.map +1 -1
- package/cjs/marker/point.d.ts +8 -3
- package/cjs/marker/point.js +33 -9
- package/cjs/marker/point.js.map +1 -1
- package/cjs/marker/register.d.ts +2 -0
- package/cjs/marker/register.js +11 -2
- package/cjs/marker/register.js.map +1 -1
- package/cjs/marker/type.d.ts +102 -12
- package/cjs/marker/type.js +8 -2
- package/cjs/marker/type.js.map +1 -1
- package/cjs/pager/pager.js +2 -2
- package/cjs/pager/pager.js.map +1 -1
- package/cjs/player/base-player.d.ts +0 -2
- package/cjs/player/base-player.js +6 -11
- package/cjs/player/base-player.js.map +1 -1
- package/cjs/player/continuous-player.d.ts +1 -1
- package/cjs/player/continuous-player.js +4 -6
- package/cjs/player/continuous-player.js.map +1 -1
- package/cjs/player/controller/controller.js +4 -4
- package/cjs/player/controller/controller.js.map +1 -1
- package/cjs/player/discrete-player.d.ts +1 -1
- package/cjs/player/discrete-player.js +4 -6
- package/cjs/player/discrete-player.js.map +1 -1
- package/cjs/segment/arc-segment.d.ts +13 -0
- package/cjs/segment/arc-segment.js +51 -0
- package/cjs/segment/arc-segment.js.map +1 -0
- package/cjs/segment/index.d.ts +1 -0
- package/cjs/segment/index.js +2 -1
- package/cjs/segment/index.js.map +1 -1
- package/cjs/segment/register.d.ts +2 -1
- package/cjs/segment/register.js +8 -3
- package/cjs/segment/register.js.map +1 -1
- package/cjs/segment/segment.d.ts +9 -7
- package/cjs/segment/segment.js +12 -8
- package/cjs/segment/segment.js.map +1 -1
- package/cjs/segment/type.d.ts +24 -4
- package/cjs/segment/type.js.map +1 -1
- package/cjs/slider/slider.d.ts +0 -2
- package/cjs/slider/slider.js +38 -53
- package/cjs/slider/slider.js.map +1 -1
- package/cjs/slider/type.d.ts +0 -1
- package/cjs/slider/type.js.map +1 -1
- package/cjs/tag/tag.d.ts +5 -0
- package/cjs/tag/tag.js +14 -5
- package/cjs/tag/tag.js.map +1 -1
- package/cjs/util/interaction.d.ts +4 -0
- package/cjs/util/interaction.js +37 -0
- package/cjs/util/interaction.js.map +1 -0
- package/cjs/util/text.d.ts +1 -1
- package/cjs/util/text.js +7 -6
- package/cjs/util/text.js.map +1 -1
- package/es/axis/base.js +13 -23
- package/es/axis/base.js.map +1 -1
- package/es/axis/circle.js +2 -2
- package/es/axis/circle.js.map +1 -1
- package/es/axis/grid/base.js +6 -2
- package/es/axis/grid/base.js.map +1 -1
- package/es/axis/index.d.ts +0 -1
- package/es/axis/index.js +0 -2
- package/es/axis/index.js.map +1 -1
- package/es/axis/line.js +5 -5
- package/es/axis/line.js.map +1 -1
- package/es/axis/mixin/circle.js +3 -2
- package/es/axis/mixin/circle.js.map +1 -1
- package/es/axis/overlap/auto-limit.js +13 -9
- package/es/axis/overlap/auto-limit.js.map +1 -1
- package/es/axis/util.d.ts +2 -5
- package/es/axis/util.js +1 -15
- package/es/axis/util.js.map +1 -1
- package/es/brush/brush.js +9 -11
- package/es/brush/brush.js.map +1 -1
- package/es/brush/type.js +1 -2
- package/es/checkbox/checkbox.d.ts +1 -1
- package/es/checkbox/checkbox.js +10 -9
- package/es/checkbox/checkbox.js.map +1 -1
- package/es/crosshair/polygon.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/indicator/indicator.js +3 -3
- package/es/indicator/indicator.js.map +1 -1
- package/es/indicator/type.js +1 -1
- package/es/label/arc.d.ts +2 -2
- package/es/label/base.d.ts +2 -2
- package/es/label/base.js +1 -3
- package/es/label/base.js.map +1 -1
- package/es/label/index.js +1 -2
- package/es/label/type.js +2 -1
- package/es/label/util.js +1 -1
- package/es/legend/color/color.js +5 -7
- package/es/legend/color/color.js.map +1 -1
- package/es/legend/discrete/discrete.js +2 -4
- package/es/legend/discrete/discrete.js.map +1 -1
- package/es/legend/size/size.js +4 -6
- package/es/legend/size/size.js.map +1 -1
- package/es/marker/animate/animate.d.ts +13 -0
- package/es/marker/animate/animate.js +92 -0
- package/es/marker/animate/animate.js.map +1 -0
- package/es/marker/animate/call-in.d.ts +4 -0
- package/es/marker/animate/call-in.js +17 -0
- package/es/marker/animate/call-in.js.map +1 -0
- package/es/marker/animate/clip-in.d.ts +4 -0
- package/es/marker/animate/clip-in.js +15 -0
- package/es/marker/animate/clip-in.js.map +1 -0
- package/es/marker/animate/common.d.ts +9 -0
- package/es/marker/animate/common.js +39 -0
- package/es/marker/animate/common.js.map +1 -0
- package/es/marker/animate/fade-in.d.ts +7 -0
- package/es/marker/animate/fade-in.js +20 -0
- package/es/marker/animate/fade-in.js.map +1 -0
- package/es/marker/animate/fade-out.d.ts +7 -0
- package/es/marker/animate/fade-out.js +20 -0
- package/es/marker/animate/fade-out.js.map +1 -0
- package/es/marker/animate/index.js +3 -0
- package/es/marker/animate/index.js.map +1 -0
- package/es/marker/arc-area.d.ts +55 -0
- package/es/marker/arc-area.js +143 -0
- package/es/marker/arc-area.js.map +1 -0
- package/es/marker/arc-line.d.ts +25 -0
- package/es/marker/arc-line.js +114 -0
- package/es/marker/arc-line.js.map +1 -0
- package/es/marker/area.d.ts +14 -4
- package/es/marker/area.js +36 -19
- package/es/marker/area.js.map +1 -1
- package/es/marker/base.d.ts +21 -3
- package/es/marker/base.js +43 -4
- package/es/marker/base.js.map +1 -1
- package/es/marker/common-line.d.ts +22 -0
- package/es/marker/common-line.js +58 -0
- package/es/marker/common-line.js.map +1 -0
- package/es/marker/config.d.ts +79 -6
- package/es/marker/config.js +79 -37
- package/es/marker/config.js.map +1 -1
- package/es/marker/index.d.ts +2 -0
- package/es/marker/index.js +4 -0
- package/es/marker/index.js.map +1 -1
- package/es/marker/line.d.ts +24 -12
- package/es/marker/line.js +116 -48
- package/es/marker/line.js.map +1 -1
- package/es/marker/point.d.ts +8 -3
- package/es/marker/point.js +34 -6
- package/es/marker/point.js.map +1 -1
- package/es/marker/register.d.ts +2 -0
- package/es/marker/register.js +10 -2
- package/es/marker/register.js.map +1 -1
- package/es/marker/type.d.ts +102 -12
- package/es/marker/type.js +9 -0
- package/es/marker/type.js.map +1 -1
- package/es/pager/pager.js +2 -2
- package/es/pager/pager.js.map +1 -1
- package/es/player/base-player.d.ts +0 -2
- package/es/player/base-player.js +6 -11
- package/es/player/base-player.js.map +1 -1
- package/es/player/continuous-player.d.ts +1 -1
- package/es/player/continuous-player.js +4 -6
- package/es/player/continuous-player.js.map +1 -1
- package/es/player/controller/controller.js +5 -5
- package/es/player/controller/controller.js.map +1 -1
- package/es/player/discrete-player.d.ts +1 -1
- package/es/player/discrete-player.js +4 -6
- package/es/player/discrete-player.js.map +1 -1
- package/es/segment/arc-segment.d.ts +13 -0
- package/es/segment/arc-segment.js +49 -0
- package/es/segment/arc-segment.js.map +1 -0
- package/es/segment/index.d.ts +1 -0
- package/es/segment/index.js +2 -0
- package/es/segment/index.js.map +1 -1
- package/es/segment/register.d.ts +2 -1
- package/es/segment/register.js +6 -2
- package/es/segment/register.js.map +1 -1
- package/es/segment/segment.d.ts +9 -7
- package/es/segment/segment.js +11 -8
- package/es/segment/segment.js.map +1 -1
- package/es/segment/type.d.ts +24 -4
- package/es/segment/type.js.map +1 -1
- package/es/slider/slider.d.ts +0 -2
- package/es/slider/slider.js +36 -50
- package/es/slider/slider.js.map +1 -1
- package/es/slider/type.d.ts +0 -1
- package/es/slider/type.js.map +1 -1
- package/es/tag/tag.d.ts +5 -0
- package/es/tag/tag.js +14 -5
- package/es/tag/tag.js.map +1 -1
- package/es/util/interaction.d.ts +4 -0
- package/es/util/interaction.js +30 -0
- package/es/util/interaction.js.map +1 -0
- package/es/util/text.d.ts +1 -1
- package/es/util/text.js +7 -6
- package/es/util/text.js.map +1 -1
- package/package.json +3 -3
- package/cjs/marker/util.js +0 -3
- package/cjs/marker/util.js.map +0 -1
- package/es/marker/util.js +0 -3
- package/es/marker/util.js.map +0 -1
- /package/cjs/marker/{util.d.ts → animate/index.d.ts} +0 -0
- /package/es/marker/{util.d.ts → animate/index.d.ts} +0 -0
package/es/marker/config.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TextAlignType, TextBaselineType } from '@visactor/vrender-core';
|
|
2
|
-
import { IMarkAreaLabelPosition, IMarkLineLabelPosition } from './type';
|
|
2
|
+
import { IMarkAreaLabelPosition, IMarkLineLabelPosition, IMarkCommonArcLabelPosition } from './type';
|
|
3
3
|
export declare const DEFAULT_MARK_LINE_THEME: {
|
|
4
|
+
interactive: boolean;
|
|
4
5
|
startSymbol: {
|
|
5
6
|
visible: boolean;
|
|
6
7
|
symbolType: string;
|
|
@@ -27,6 +28,8 @@ export declare const DEFAULT_MARK_LINE_THEME: {
|
|
|
27
28
|
fontSize: number;
|
|
28
29
|
fontWeight: string;
|
|
29
30
|
fontStyle: string;
|
|
31
|
+
textAlign: string;
|
|
32
|
+
textBaseline: string;
|
|
30
33
|
};
|
|
31
34
|
padding: number[];
|
|
32
35
|
panel: {
|
|
@@ -42,13 +45,53 @@ export declare const DEFAULT_MARK_LINE_THEME: {
|
|
|
42
45
|
lineDash: number[];
|
|
43
46
|
};
|
|
44
47
|
};
|
|
45
|
-
export declare const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
export declare const DEFAULT_MARK_ARC_LINE_THEME: {
|
|
49
|
+
interactive: boolean;
|
|
50
|
+
startSymbol: {
|
|
51
|
+
visible: boolean;
|
|
52
|
+
symbolType: string;
|
|
53
|
+
size: number;
|
|
54
|
+
fill: string;
|
|
55
|
+
lineWidth: number;
|
|
56
|
+
};
|
|
57
|
+
endSymbol: {
|
|
58
|
+
visible: boolean;
|
|
59
|
+
symbolType: string;
|
|
60
|
+
size: number;
|
|
61
|
+
fill: string;
|
|
62
|
+
lineWidth: number;
|
|
63
|
+
};
|
|
64
|
+
label: {
|
|
65
|
+
position: IMarkCommonArcLabelPosition;
|
|
66
|
+
refX: number;
|
|
67
|
+
refY: number;
|
|
68
|
+
refAngle: number;
|
|
69
|
+
textStyle: {
|
|
70
|
+
fill: string;
|
|
71
|
+
stroke: string;
|
|
72
|
+
lineWidth: number;
|
|
73
|
+
fontSize: number;
|
|
74
|
+
fontWeight: string;
|
|
75
|
+
fontStyle: string;
|
|
76
|
+
textAlign: string;
|
|
77
|
+
textBaseline: string;
|
|
78
|
+
};
|
|
79
|
+
padding: number[];
|
|
80
|
+
panel: {
|
|
81
|
+
visible: boolean;
|
|
82
|
+
cornerRadius: number;
|
|
83
|
+
fill: string;
|
|
84
|
+
fillOpacity: number;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
lineStyle: {
|
|
88
|
+
stroke: string;
|
|
89
|
+
lineWidth: number;
|
|
90
|
+
lineDash: number[];
|
|
49
91
|
};
|
|
50
92
|
};
|
|
51
93
|
export declare const DEFAULT_MARK_AREA_THEME: {
|
|
94
|
+
interactive: boolean;
|
|
52
95
|
label: {
|
|
53
96
|
position: IMarkAreaLabelPosition;
|
|
54
97
|
textStyle: {
|
|
@@ -58,6 +101,35 @@ export declare const DEFAULT_MARK_AREA_THEME: {
|
|
|
58
101
|
fontSize: number;
|
|
59
102
|
fontWeight: string;
|
|
60
103
|
fontStyle: string;
|
|
104
|
+
textAlign: string;
|
|
105
|
+
textBaseline: string;
|
|
106
|
+
};
|
|
107
|
+
padding: number[];
|
|
108
|
+
panel: {
|
|
109
|
+
visible: boolean;
|
|
110
|
+
cornerRadius: number;
|
|
111
|
+
fill: string;
|
|
112
|
+
fillOpacity: number;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
areaStyle: {
|
|
116
|
+
fill: string;
|
|
117
|
+
visible: boolean;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
export declare const DEFAULT_MARK_ARC_AREA_THEME: {
|
|
121
|
+
interactive: boolean;
|
|
122
|
+
label: {
|
|
123
|
+
position: IMarkCommonArcLabelPosition;
|
|
124
|
+
textStyle: {
|
|
125
|
+
fill: string;
|
|
126
|
+
stroke: string;
|
|
127
|
+
lineWidth: number;
|
|
128
|
+
fontSize: number;
|
|
129
|
+
fontWeight: string;
|
|
130
|
+
fontStyle: string;
|
|
131
|
+
textAlign: string;
|
|
132
|
+
textBaseline: string;
|
|
61
133
|
};
|
|
62
134
|
padding: number[];
|
|
63
135
|
panel: {
|
|
@@ -72,13 +144,14 @@ export declare const DEFAULT_MARK_AREA_THEME: {
|
|
|
72
144
|
visible: boolean;
|
|
73
145
|
};
|
|
74
146
|
};
|
|
75
|
-
export declare const
|
|
147
|
+
export declare const DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP: {
|
|
76
148
|
[K: string]: {
|
|
77
149
|
textAlign: TextAlignType;
|
|
78
150
|
textBaseline: TextBaselineType;
|
|
79
151
|
};
|
|
80
152
|
};
|
|
81
153
|
export declare const DEFAULT_MARK_POINT_THEME: {
|
|
154
|
+
interactive: boolean;
|
|
82
155
|
itemLine: {
|
|
83
156
|
visible: boolean;
|
|
84
157
|
decorativeLine: {
|
package/es/marker/config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { IMarkAreaLabelPosition, IMarkLineLabelPosition } from "./type";
|
|
1
|
+
import { IMarkAreaLabelPosition, IMarkLineLabelPosition, IMarkCommonArcLabelPosition } from "./type";
|
|
2
2
|
|
|
3
3
|
export const DEFAULT_MARK_LINE_THEME = {
|
|
4
|
+
interactive: !0,
|
|
4
5
|
startSymbol: {
|
|
5
6
|
visible: !1,
|
|
6
7
|
symbolType: "triangle",
|
|
@@ -26,7 +27,9 @@ export const DEFAULT_MARK_LINE_THEME = {
|
|
|
26
27
|
lineWidth: 0,
|
|
27
28
|
fontSize: 10,
|
|
28
29
|
fontWeight: "normal",
|
|
29
|
-
fontStyle: "normal"
|
|
30
|
+
fontStyle: "normal",
|
|
31
|
+
textAlign: "center",
|
|
32
|
+
textBaseline: "middle"
|
|
30
33
|
},
|
|
31
34
|
padding: [ 2, 2, 4, 4 ],
|
|
32
35
|
panel: {
|
|
@@ -43,46 +46,54 @@ export const DEFAULT_MARK_LINE_THEME = {
|
|
|
43
46
|
}
|
|
44
47
|
};
|
|
45
48
|
|
|
46
|
-
export const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
insideStartBottom: {
|
|
56
|
-
textAlign: "left",
|
|
57
|
-
textBaseline: "top"
|
|
58
|
-
},
|
|
59
|
-
middle: {
|
|
60
|
-
textAlign: "center",
|
|
61
|
-
textBaseline: "middle"
|
|
62
|
-
},
|
|
63
|
-
insideMiddleTop: {
|
|
64
|
-
textAlign: "center",
|
|
65
|
-
textBaseline: "bottom"
|
|
66
|
-
},
|
|
67
|
-
insideMiddleBottom: {
|
|
68
|
-
textAlign: "center",
|
|
69
|
-
textBaseline: "top"
|
|
49
|
+
export const DEFAULT_MARK_ARC_LINE_THEME = {
|
|
50
|
+
interactive: !0,
|
|
51
|
+
startSymbol: {
|
|
52
|
+
visible: !1,
|
|
53
|
+
symbolType: "triangle",
|
|
54
|
+
size: 12,
|
|
55
|
+
fill: "rgba(46, 47, 50)",
|
|
56
|
+
lineWidth: 0
|
|
70
57
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
58
|
+
endSymbol: {
|
|
59
|
+
visible: !0,
|
|
60
|
+
symbolType: "triangle",
|
|
61
|
+
size: 12,
|
|
62
|
+
fill: "rgba(46, 47, 50)",
|
|
63
|
+
lineWidth: 0
|
|
74
64
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
label: {
|
|
66
|
+
position: IMarkCommonArcLabelPosition.arcOuterMiddle,
|
|
67
|
+
refX: 0,
|
|
68
|
+
refY: 0,
|
|
69
|
+
refAngle: 0,
|
|
70
|
+
textStyle: {
|
|
71
|
+
fill: "#fff",
|
|
72
|
+
stroke: "#fff",
|
|
73
|
+
lineWidth: 0,
|
|
74
|
+
fontSize: 10,
|
|
75
|
+
fontWeight: "normal",
|
|
76
|
+
fontStyle: "normal",
|
|
77
|
+
textAlign: "center",
|
|
78
|
+
textBaseline: "middle"
|
|
79
|
+
},
|
|
80
|
+
padding: [ 2, 2, 4, 4 ],
|
|
81
|
+
panel: {
|
|
82
|
+
visible: !0,
|
|
83
|
+
cornerRadius: 0,
|
|
84
|
+
fill: "rgb(48, 115, 242)",
|
|
85
|
+
fillOpacity: .8
|
|
86
|
+
}
|
|
78
87
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
lineStyle: {
|
|
89
|
+
stroke: "#b2bacf",
|
|
90
|
+
lineWidth: 1,
|
|
91
|
+
lineDash: [ 2 ]
|
|
82
92
|
}
|
|
83
93
|
};
|
|
84
94
|
|
|
85
95
|
export const DEFAULT_MARK_AREA_THEME = {
|
|
96
|
+
interactive: !0,
|
|
86
97
|
label: {
|
|
87
98
|
position: IMarkAreaLabelPosition.right,
|
|
88
99
|
textStyle: {
|
|
@@ -91,7 +102,37 @@ export const DEFAULT_MARK_AREA_THEME = {
|
|
|
91
102
|
lineWidth: 0,
|
|
92
103
|
fontSize: 10,
|
|
93
104
|
fontWeight: "normal",
|
|
94
|
-
fontStyle: "normal"
|
|
105
|
+
fontStyle: "normal",
|
|
106
|
+
textAlign: "center",
|
|
107
|
+
textBaseline: "middle"
|
|
108
|
+
},
|
|
109
|
+
padding: [ 2, 2, 4, 4 ],
|
|
110
|
+
panel: {
|
|
111
|
+
visible: !0,
|
|
112
|
+
cornerRadius: 0,
|
|
113
|
+
fill: "rgb(48, 115, 242)",
|
|
114
|
+
fillOpacity: .8
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
areaStyle: {
|
|
118
|
+
fill: "#b2bacf",
|
|
119
|
+
visible: !0
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export const DEFAULT_MARK_ARC_AREA_THEME = {
|
|
124
|
+
interactive: !0,
|
|
125
|
+
label: {
|
|
126
|
+
position: IMarkCommonArcLabelPosition.arcOuterMiddle,
|
|
127
|
+
textStyle: {
|
|
128
|
+
fill: "#fff",
|
|
129
|
+
stroke: "#fff",
|
|
130
|
+
lineWidth: 0,
|
|
131
|
+
fontSize: 10,
|
|
132
|
+
fontWeight: "normal",
|
|
133
|
+
fontStyle: "normal",
|
|
134
|
+
textAlign: "center",
|
|
135
|
+
textBaseline: "middle"
|
|
95
136
|
},
|
|
96
137
|
padding: [ 2, 2, 4, 4 ],
|
|
97
138
|
panel: {
|
|
@@ -107,7 +148,7 @@ export const DEFAULT_MARK_AREA_THEME = {
|
|
|
107
148
|
}
|
|
108
149
|
};
|
|
109
150
|
|
|
110
|
-
export const
|
|
151
|
+
export const DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP = {
|
|
111
152
|
left: {
|
|
112
153
|
textAlign: "right",
|
|
113
154
|
textBaseline: "middle"
|
|
@@ -147,6 +188,7 @@ export const DEFAULT_MARK_AREA_TEXT_STYLE_MAP = {
|
|
|
147
188
|
};
|
|
148
189
|
|
|
149
190
|
export const DEFAULT_MARK_POINT_THEME = {
|
|
191
|
+
interactive: !0,
|
|
150
192
|
itemLine: {
|
|
151
193
|
visible: !0,
|
|
152
194
|
decorativeLine: {
|
package/es/marker/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/marker/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAExE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,WAAW,EAAE;QACX,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,CAAC;KACb;IACD,SAAS,EAAE;QACT,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,CAAC;KACb;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,sBAAsB,CA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pB;IACD,MAAM,EAAE;QACN,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,QAAQ;KACvB;IACD,SAAS,EAAE;QACT,SAAS,EAAE,OAAO;QAClB,YAAY,EAAE,QAAQ;KACvB;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,OAAO;QAClB,YAAY,EAAE,KAAK;KACpB;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,OAAO;QAClB,YAAY,EAAE,QAAQ;KACvB;CACF,CAAC","file":"config.js","sourcesContent":["import type { TextAlignType, TextBaselineType } from '@visactor/vrender-core';\nimport { IMarkAreaLabelPosition, IMarkLineLabelPosition } from './type';\n\nexport const DEFAULT_MARK_LINE_THEME = {\n startSymbol: {\n visible: false,\n symbolType: 'triangle',\n size: 12,\n fill: 'rgba(46, 47, 50)',\n lineWidth: 0\n },\n endSymbol: {\n visible: true,\n symbolType: 'triangle',\n size: 12,\n fill: 'rgba(46, 47, 50)',\n lineWidth: 0\n },\n label: {\n position: IMarkLineLabelPosition.end,\n refX: 0,\n refY: 0,\n refAngle: 0,\n textStyle: {\n fill: '#fff',\n stroke: '#fff',\n lineWidth: 0,\n fontSize: 10,\n fontWeight: 'normal',\n fontStyle: 'normal'\n },\n padding: [2, 2, 4, 4],\n panel: {\n visible: true,\n cornerRadius: 0,\n fill: 'rgb(48, 115, 242)',\n fillOpacity: 0.8\n }\n },\n lineStyle: {\n stroke: '#b2bacf',\n lineWidth: 1,\n lineDash: [2]\n }\n};\n\nexport const DEFAULT_MARK_LINE_TEXT_STYLE_MAP: {\n [K: string]: {\n textAlign: TextAlignType;\n textBaseline: TextBaselineType;\n };\n} = {\n start: {\n textAlign: 'right',\n textBaseline: 'middle'\n },\n insideStartTop: {\n textAlign: 'left',\n textBaseline: 'bottom'\n },\n insideStartBottom: {\n textAlign: 'left',\n textBaseline: 'top'\n },\n\n middle: {\n textAlign: 'center',\n textBaseline: 'middle'\n },\n insideMiddleTop: {\n textAlign: 'center',\n textBaseline: 'bottom'\n },\n insideMiddleBottom: {\n textAlign: 'center',\n textBaseline: 'top'\n },\n\n end: {\n textAlign: 'left',\n textBaseline: 'middle'\n },\n insideEndTop: {\n textAlign: 'right',\n textBaseline: 'bottom'\n },\n insideEndBottom: {\n textAlign: 'right',\n textBaseline: 'top'\n }\n};\n\nexport const DEFAULT_MARK_AREA_THEME = {\n label: {\n position: IMarkAreaLabelPosition.right,\n textStyle: {\n fill: '#fff',\n stroke: '#fff',\n lineWidth: 0,\n fontSize: 10,\n fontWeight: 'normal',\n fontStyle: 'normal'\n },\n padding: [2, 2, 4, 4],\n panel: {\n visible: true,\n cornerRadius: 0,\n fill: 'rgb(48, 115, 242)',\n fillOpacity: 0.8\n }\n },\n areaStyle: {\n fill: '#b2bacf',\n visible: true\n }\n};\n\nexport const DEFAULT_MARK_AREA_TEXT_STYLE_MAP: {\n [K: string]: {\n textAlign: TextAlignType;\n textBaseline: TextBaselineType;\n };\n} = {\n left: {\n textAlign: 'right',\n textBaseline: 'middle'\n },\n insideLeft: {\n textAlign: 'left',\n textBaseline: 'middle'\n },\n\n right: {\n textAlign: 'left',\n textBaseline: 'middle'\n },\n insideRight: {\n textAlign: 'right',\n textBaseline: 'middle'\n },\n\n top: {\n textAlign: 'center',\n textBaseline: 'bottom'\n },\n insideTop: {\n textAlign: 'center',\n textBaseline: 'top'\n },\n\n bottom: {\n textAlign: 'center',\n textBaseline: 'top'\n },\n insideBottom: {\n textAlign: 'center',\n textBaseline: 'bottom'\n },\n\n middle: {\n textAlign: 'center',\n textBaseline: 'middle'\n }\n};\n\nexport const DEFAULT_MARK_POINT_THEME = {\n itemLine: {\n visible: true,\n decorativeLine: {\n visible: false,\n length: 30\n },\n startSymbol: {\n visible: true,\n clip: true,\n symbolType: 'circle',\n size: 20,\n style: {\n fill: false,\n stroke: 'rgba(46, 47, 50)'\n }\n },\n endSymbol: {\n visible: false,\n clip: true,\n symbolType: 'triangle',\n size: 12,\n style: {\n fill: false,\n stroke: 'rgba(46, 47, 50)'\n }\n },\n lineStyle: {\n stroke: '#000',\n lineWidth: 1\n }\n },\n itemContent: {\n type: 'text',\n position: 'middle',\n refX: 10,\n symbolStyle: {\n symbolType: 'star',\n fill: 'rgb(48, 115, 242)',\n fillOpacity: 0.8,\n size: 20\n },\n textStyle: {\n dx: 0,\n dy: 0\n },\n imageStyle: {\n width: 80,\n height: 80\n },\n richTextStyle: {\n width: 100,\n height: 100\n }\n }\n};\n\nexport const DEFAULT_MARK_POINT_TEXT_STYLE_MAP: {\n [K: string]: {\n textAlign: TextAlignType;\n textBaseline: TextBaselineType;\n };\n} = {\n top: {\n textAlign: 'left',\n textBaseline: 'bottom'\n },\n bottom: {\n textAlign: 'left',\n textBaseline: 'top'\n },\n middle: {\n textAlign: 'left',\n textBaseline: 'middle'\n },\n insideTop: {\n textAlign: 'right',\n textBaseline: 'bottom'\n },\n insideBottom: {\n textAlign: 'right',\n textBaseline: 'top'\n },\n insideMiddle: {\n textAlign: 'right',\n textBaseline: 'middle'\n }\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/marker/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAErG,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE;QACX,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,CAAC;KACb;IACD,SAAS,EAAE;QACT,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,CAAC;KACb;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,sBAAsB,CAAC,GAAG;QACpC,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,CAAC;QACX,S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AAO;QAClB,YAAY,EAAE,QAAQ;KACvB;CACF,CAAC","file":"config.js","sourcesContent":["import type { TextAlignType, TextBaselineType } from '@visactor/vrender-core';\nimport { IMarkAreaLabelPosition, IMarkLineLabelPosition, IMarkCommonArcLabelPosition } from './type';\n\nexport const DEFAULT_MARK_LINE_THEME = {\n interactive: true,\n startSymbol: {\n visible: false,\n symbolType: 'triangle',\n size: 12,\n fill: 'rgba(46, 47, 50)',\n lineWidth: 0\n },\n endSymbol: {\n visible: true,\n symbolType: 'triangle',\n size: 12,\n fill: 'rgba(46, 47, 50)',\n lineWidth: 0\n },\n label: {\n position: IMarkLineLabelPosition.end,\n refX: 0,\n refY: 0,\n refAngle: 0,\n textStyle: {\n fill: '#fff',\n stroke: '#fff',\n lineWidth: 0,\n fontSize: 10,\n fontWeight: 'normal',\n fontStyle: 'normal',\n textAlign: 'center',\n textBaseline: 'middle'\n },\n padding: [2, 2, 4, 4],\n panel: {\n visible: true,\n cornerRadius: 0,\n fill: 'rgb(48, 115, 242)',\n fillOpacity: 0.8\n }\n },\n lineStyle: {\n stroke: '#b2bacf',\n lineWidth: 1,\n lineDash: [2]\n }\n};\n\nexport const DEFAULT_MARK_ARC_LINE_THEME = {\n interactive: true,\n startSymbol: {\n visible: false,\n symbolType: 'triangle',\n size: 12,\n fill: 'rgba(46, 47, 50)',\n lineWidth: 0\n },\n endSymbol: {\n visible: true,\n symbolType: 'triangle',\n size: 12,\n fill: 'rgba(46, 47, 50)',\n lineWidth: 0\n },\n label: {\n position: IMarkCommonArcLabelPosition.arcOuterMiddle,\n refX: 0,\n refY: 0,\n refAngle: 0,\n textStyle: {\n fill: '#fff',\n stroke: '#fff',\n lineWidth: 0,\n fontSize: 10,\n fontWeight: 'normal',\n fontStyle: 'normal',\n textAlign: 'center',\n textBaseline: 'middle'\n },\n padding: [2, 2, 4, 4],\n panel: {\n visible: true,\n cornerRadius: 0,\n fill: 'rgb(48, 115, 242)',\n fillOpacity: 0.8\n }\n },\n lineStyle: {\n stroke: '#b2bacf',\n lineWidth: 1,\n lineDash: [2]\n }\n};\n\nexport const DEFAULT_MARK_AREA_THEME = {\n interactive: true,\n label: {\n position: IMarkAreaLabelPosition.right,\n textStyle: {\n fill: '#fff',\n stroke: '#fff',\n lineWidth: 0,\n fontSize: 10,\n fontWeight: 'normal',\n fontStyle: 'normal',\n textAlign: 'center',\n textBaseline: 'middle'\n },\n padding: [2, 2, 4, 4],\n panel: {\n visible: true,\n cornerRadius: 0,\n fill: 'rgb(48, 115, 242)',\n fillOpacity: 0.8\n }\n },\n areaStyle: {\n fill: '#b2bacf',\n visible: true\n }\n};\n\nexport const DEFAULT_MARK_ARC_AREA_THEME = {\n interactive: true,\n label: {\n position: IMarkCommonArcLabelPosition.arcOuterMiddle,\n textStyle: {\n fill: '#fff',\n stroke: '#fff',\n lineWidth: 0,\n fontSize: 10,\n fontWeight: 'normal',\n fontStyle: 'normal',\n textAlign: 'center',\n textBaseline: 'middle'\n },\n padding: [2, 2, 4, 4],\n panel: {\n visible: true,\n cornerRadius: 0,\n fill: 'rgb(48, 115, 242)',\n fillOpacity: 0.8\n }\n },\n areaStyle: {\n fill: '#b2bacf',\n visible: true\n }\n};\n\nexport const DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP: {\n [K: string]: {\n textAlign: TextAlignType;\n textBaseline: TextBaselineType;\n };\n} = {\n left: {\n textAlign: 'right',\n textBaseline: 'middle'\n },\n insideLeft: {\n textAlign: 'left',\n textBaseline: 'middle'\n },\n\n right: {\n textAlign: 'left',\n textBaseline: 'middle'\n },\n insideRight: {\n textAlign: 'right',\n textBaseline: 'middle'\n },\n\n top: {\n textAlign: 'center',\n textBaseline: 'bottom'\n },\n insideTop: {\n textAlign: 'center',\n textBaseline: 'top'\n },\n\n bottom: {\n textAlign: 'center',\n textBaseline: 'top'\n },\n insideBottom: {\n textAlign: 'center',\n textBaseline: 'bottom'\n },\n\n middle: {\n textAlign: 'center',\n textBaseline: 'middle'\n }\n};\n\nexport const DEFAULT_MARK_POINT_THEME = {\n interactive: true,\n itemLine: {\n visible: true,\n decorativeLine: {\n visible: false,\n length: 30\n },\n startSymbol: {\n visible: true,\n clip: true,\n symbolType: 'circle',\n size: 20,\n style: {\n fill: false,\n stroke: 'rgba(46, 47, 50)'\n }\n },\n endSymbol: {\n visible: false,\n clip: true,\n symbolType: 'triangle',\n size: 12,\n style: {\n fill: false,\n stroke: 'rgba(46, 47, 50)'\n }\n },\n lineStyle: {\n stroke: '#000',\n lineWidth: 1\n }\n },\n itemContent: {\n type: 'text',\n position: 'middle',\n refX: 10,\n symbolStyle: {\n symbolType: 'star',\n fill: 'rgb(48, 115, 242)',\n fillOpacity: 0.8,\n size: 20\n },\n textStyle: {\n dx: 0,\n dy: 0\n },\n imageStyle: {\n width: 80,\n height: 80\n },\n richTextStyle: {\n width: 100,\n height: 100\n }\n }\n};\n\nexport const DEFAULT_MARK_POINT_TEXT_STYLE_MAP: {\n [K: string]: {\n textAlign: TextAlignType;\n textBaseline: TextBaselineType;\n };\n} = {\n top: {\n textAlign: 'left',\n textBaseline: 'bottom'\n },\n bottom: {\n textAlign: 'left',\n textBaseline: 'top'\n },\n middle: {\n textAlign: 'left',\n textBaseline: 'middle'\n },\n insideTop: {\n textAlign: 'right',\n textBaseline: 'bottom'\n },\n insideBottom: {\n textAlign: 'right',\n textBaseline: 'top'\n },\n insideMiddle: {\n textAlign: 'right',\n textBaseline: 'middle'\n }\n};\n"]}
|
package/es/marker/index.d.ts
CHANGED
package/es/marker/index.js
CHANGED
package/es/marker/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/marker/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC","file":"index.js","sourcesContent":["export * from './type';\nexport * from './line';\nexport * from './area';\nexport * from './point';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/marker/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","file":"index.js","sourcesContent":["export * from './type';\nexport * from './line';\nexport * from './area';\nexport * from './arc-line';\n// export * from './polar/line';\nexport * from './arc-area';\nexport * from './point';\n"]}
|
package/es/marker/line.d.ts
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Tag } from '../tag';
|
|
4
|
-
import { Marker } from './base';
|
|
5
|
-
import type { MarkLineAttrs } from './type';
|
|
1
|
+
import { IMarkLineLabelPosition } from './type';
|
|
2
|
+
import type { MarkLineAttrs, MarkerAnimationState } from './type';
|
|
6
3
|
import type { ComponentOptions } from '../interface';
|
|
7
|
-
|
|
4
|
+
import { MarkCommonLine } from './common-line';
|
|
5
|
+
import type { ArcSegment } from '../segment';
|
|
6
|
+
import { Segment } from '../segment';
|
|
7
|
+
import type { ILineGraphicAttribute } from '@visactor/vrender-core';
|
|
8
|
+
export declare function registerMarkLineAnimate(): void;
|
|
9
|
+
export declare class MarkLine extends MarkCommonLine<ILineGraphicAttribute, IMarkLineLabelPosition> {
|
|
8
10
|
name: string;
|
|
9
11
|
static defaultAttributes: Partial<MarkLineAttrs>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
getLabel(): Tag;
|
|
12
|
+
protected _line: Segment | ArcSegment;
|
|
13
|
+
protected markerAnimate(state: MarkerAnimationState): void;
|
|
13
14
|
constructor(attributes: MarkLineAttrs, options?: ComponentOptions);
|
|
14
|
-
protected
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
protected getLabelOffsetByPosition(position: IMarkLineLabelPosition): {
|
|
16
|
+
offsetX: number;
|
|
17
|
+
offsetY: number;
|
|
18
|
+
};
|
|
19
|
+
protected getPointAttrByPosition(position: IMarkLineLabelPosition): {
|
|
20
|
+
position: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
angle: number;
|
|
25
|
+
};
|
|
26
|
+
protected getRotateByAngle(angle: number): number;
|
|
27
|
+
protected createSegment(): Segment;
|
|
28
|
+
protected setLineAttributes(): void;
|
|
17
29
|
protected isValidPoints(): boolean;
|
|
18
30
|
}
|
package/es/marker/line.js
CHANGED
|
@@ -1,73 +1,144 @@
|
|
|
1
1
|
import { isValidNumber, merge } from "@visactor/vutils";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { IMarkLineLabelPosition } from "./type";
|
|
4
|
+
|
|
5
|
+
import { loadMarkLineComponent } from "./register";
|
|
4
6
|
|
|
5
|
-
import {
|
|
7
|
+
import { MarkCommonLine } from "./common-line";
|
|
6
8
|
|
|
7
|
-
import {
|
|
9
|
+
import { Segment } from "../segment";
|
|
8
10
|
|
|
9
|
-
import {
|
|
11
|
+
import { DEFAULT_STATES } from "../constant";
|
|
10
12
|
|
|
11
|
-
import {
|
|
13
|
+
import { DEFAULT_MARK_LINE_THEME } from "./config";
|
|
12
14
|
|
|
13
|
-
import {
|
|
15
|
+
import { commonMarkLineAnimate } from "./animate/animate";
|
|
14
16
|
|
|
15
17
|
loadMarkLineComponent();
|
|
16
18
|
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
export function registerMarkLineAnimate() {
|
|
20
|
+
MarkLine._animate = commonMarkLineAnimate;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class MarkLine extends MarkCommonLine {
|
|
24
|
+
markerAnimate(state) {
|
|
25
|
+
MarkLine._animate && MarkLine._animate(this._line, this._label, this._animationConfig, state);
|
|
23
26
|
}
|
|
24
27
|
constructor(attributes, options) {
|
|
25
28
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, MarkLine.defaultAttributes, attributes)),
|
|
26
29
|
this.name = "markLine";
|
|
27
30
|
}
|
|
28
|
-
|
|
29
|
-
var _a, _b;
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
getLabelOffsetByPosition(position) {
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
33
|
+
const labelRectHeight = Math.abs((null !== (_c = null === (_b = null === (_a = this._label.getTextShape()) || void 0 === _a ? void 0 : _a.AABBBounds) || void 0 === _b ? void 0 : _b.y2) && void 0 !== _c ? _c : 0) - (null !== (_e = null === (_d = this._label.getTextShape()) || void 0 === _d ? void 0 : _d.AABBBounds.y1) && void 0 !== _e ? _e : 0)), labelTextHeight = Math.abs((null !== (_h = null === (_g = null === (_f = this._label.getBgRect()) || void 0 === _f ? void 0 : _f.AABBBounds) || void 0 === _g ? void 0 : _g.y2) && void 0 !== _h ? _h : 0) - (null !== (_k = null === (_j = this._label.getBgRect()) || void 0 === _j ? void 0 : _j.AABBBounds.y1) && void 0 !== _k ? _k : 0)), labelHeight = Math.max(labelRectHeight, labelTextHeight), labelRectWidth = Math.abs((null !== (_o = null === (_m = null === (_l = this._label.getTextShape()) || void 0 === _l ? void 0 : _l.AABBBounds) || void 0 === _m ? void 0 : _m.x2) && void 0 !== _o ? _o : 0) - (null !== (_q = null === (_p = this._label.getTextShape()) || void 0 === _p ? void 0 : _p.AABBBounds.x1) && void 0 !== _q ? _q : 0)), labelTextWidth = Math.abs((null !== (_t = null === (_s = null === (_r = this._label.getBgRect()) || void 0 === _r ? void 0 : _r.AABBBounds) || void 0 === _s ? void 0 : _s.x2) && void 0 !== _t ? _t : 0) - (null !== (_v = null === (_u = this._label.getBgRect()) || void 0 === _u ? void 0 : _u.AABBBounds.x1) && void 0 !== _v ? _v : 0)), labelWidth = Math.max(labelRectWidth, labelTextWidth);
|
|
34
|
+
switch (position) {
|
|
35
|
+
case IMarkLineLabelPosition.start:
|
|
36
|
+
return {
|
|
37
|
+
offsetX: -labelWidth / 2,
|
|
38
|
+
offsetY: 0
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
case IMarkLineLabelPosition.insideStartTop:
|
|
42
|
+
return {
|
|
43
|
+
offsetX: labelWidth / 2,
|
|
44
|
+
offsetY: labelHeight / 2
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
case IMarkLineLabelPosition.insideStartBottom:
|
|
48
|
+
return {
|
|
49
|
+
offsetX: labelWidth / 2,
|
|
50
|
+
offsetY: -labelHeight / 2
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
case IMarkLineLabelPosition.middle:
|
|
54
|
+
return {
|
|
55
|
+
offsetX: 0,
|
|
56
|
+
offsetY: 0
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
case IMarkLineLabelPosition.insideMiddleTop:
|
|
60
|
+
return {
|
|
61
|
+
offsetX: 0,
|
|
62
|
+
offsetY: labelHeight / 2
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
case IMarkLineLabelPosition.insideMiddleBottom:
|
|
66
|
+
return {
|
|
67
|
+
offsetX: 0,
|
|
68
|
+
offsetY: -labelHeight / 2
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
case IMarkLineLabelPosition.end:
|
|
72
|
+
return {
|
|
73
|
+
offsetX: labelWidth / 2,
|
|
74
|
+
offsetY: 0
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
case IMarkLineLabelPosition.insideEndTop:
|
|
78
|
+
return {
|
|
79
|
+
offsetX: -labelWidth / 2,
|
|
80
|
+
offsetY: labelHeight / 2
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
case IMarkLineLabelPosition.insideEndBottom:
|
|
84
|
+
return {
|
|
85
|
+
offsetX: -labelWidth / 2,
|
|
86
|
+
offsetY: -labelHeight / 2
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
default:
|
|
90
|
+
return {
|
|
91
|
+
offsetX: labelWidth / 2,
|
|
92
|
+
offsetY: 0
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
getPointAttrByPosition(position) {
|
|
97
|
+
var _a;
|
|
98
|
+
const {label: label = {}} = this.attribute, {refX: refX = 0, refY: refY = 0} = label, points = this._line.getMainSegmentPoints(), labelAngle = null !== (_a = this._line.getEndAngle()) && void 0 !== _a ? _a : 0, totalRefX = refX + this.getLabelOffsetByPosition(position).offsetX, totalRefY = refY + this.getLabelOffsetByPosition(position).offsetY, labelOffsetX = totalRefX * Math.cos(labelAngle) + totalRefY * Math.cos(labelAngle - Math.PI / 2), labelOffsetY = totalRefX * Math.sin(labelAngle) + totalRefY * Math.sin(labelAngle - Math.PI / 2);
|
|
99
|
+
return position.includes("start") || position.includes("Start") ? {
|
|
100
|
+
position: {
|
|
101
|
+
x: points[0].x + labelOffsetX,
|
|
102
|
+
y: points[0].y + labelOffsetY
|
|
103
|
+
},
|
|
104
|
+
angle: labelAngle
|
|
35
105
|
} : position.includes("middle") || position.includes("Middle") ? {
|
|
36
|
-
|
|
37
|
-
|
|
106
|
+
position: {
|
|
107
|
+
x: (points[0].x + points[points.length - 1].x) / 2 + labelOffsetX,
|
|
108
|
+
y: (points[0].y + points[points.length - 1].y) / 2 + labelOffsetY
|
|
109
|
+
},
|
|
110
|
+
angle: labelAngle
|
|
38
111
|
} : {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
const {x: x, y: y, width: width, height: height} = limitRect;
|
|
46
|
-
limitShapeInBounds(this._label, {
|
|
47
|
-
x1: x,
|
|
48
|
-
y1: y,
|
|
49
|
-
x2: x + width,
|
|
50
|
-
y2: y + height
|
|
51
|
-
});
|
|
52
|
-
}
|
|
112
|
+
position: {
|
|
113
|
+
x: points[points.length - 1].x + labelOffsetX,
|
|
114
|
+
y: points[points.length - 1].y + labelOffsetY
|
|
115
|
+
},
|
|
116
|
+
angle: labelAngle
|
|
117
|
+
};
|
|
53
118
|
}
|
|
54
|
-
|
|
55
|
-
|
|
119
|
+
getRotateByAngle(angle) {
|
|
120
|
+
var _a;
|
|
121
|
+
return angle + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
|
|
122
|
+
}
|
|
123
|
+
createSegment() {
|
|
124
|
+
const {points: points, startSymbol: startSymbol, endSymbol: endSymbol, lineStyle: lineStyle, mainSegmentIndex: mainSegmentIndex, multiSegment: multiSegment, state: state} = this.attribute;
|
|
125
|
+
return new Segment({
|
|
56
126
|
points: points,
|
|
57
127
|
startSymbol: startSymbol,
|
|
58
128
|
endSymbol: endSymbol,
|
|
59
129
|
lineStyle: lineStyle,
|
|
60
130
|
mainSegmentIndex: mainSegmentIndex,
|
|
61
131
|
multiSegment: multiSegment,
|
|
62
|
-
pickable: !1
|
|
132
|
+
pickable: !1,
|
|
133
|
+
state: {
|
|
134
|
+
line: merge({}, DEFAULT_STATES, null == state ? void 0 : state.line),
|
|
135
|
+
startSymbol: merge({}, DEFAULT_STATES, null == state ? void 0 : state.lineStartSymbol),
|
|
136
|
+
endSymbol: merge({}, DEFAULT_STATES, null == state ? void 0 : state.lineEndSymbol)
|
|
137
|
+
}
|
|
63
138
|
});
|
|
64
|
-
line.name = "mark-line-line", this._line = line, container.add(line);
|
|
65
|
-
const markLabel = new Tag(Object.assign({}, label));
|
|
66
|
-
markLabel.name = "mark-line-label", this._label = markLabel, container.add(markLabel),
|
|
67
|
-
this.setLabelPos();
|
|
68
139
|
}
|
|
69
|
-
|
|
70
|
-
const {points: points, startSymbol: startSymbol, endSymbol: endSymbol,
|
|
140
|
+
setLineAttributes() {
|
|
141
|
+
const {points: points, startSymbol: startSymbol, endSymbol: endSymbol, lineStyle: lineStyle, mainSegmentIndex: mainSegmentIndex, multiSegment: multiSegment} = this.attribute;
|
|
71
142
|
this._line && this._line.setAttributes({
|
|
72
143
|
points: points,
|
|
73
144
|
startSymbol: startSymbol,
|
|
@@ -75,10 +146,7 @@ export class MarkLine extends Marker {
|
|
|
75
146
|
lineStyle: lineStyle,
|
|
76
147
|
mainSegmentIndex: mainSegmentIndex,
|
|
77
148
|
multiSegment: multiSegment
|
|
78
|
-
})
|
|
79
|
-
dx: 0,
|
|
80
|
-
dy: 0
|
|
81
|
-
}, label)), this.setLabelPos();
|
|
149
|
+
});
|
|
82
150
|
}
|
|
83
151
|
isValidPoints() {
|
|
84
152
|
const {points: points} = this.attribute;
|