@visactor/vrender-components 0.18.10-alpha.0 → 0.18.10-alpha.2
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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/label/arc.d.ts +2 -2
- package/cjs/label/base.d.ts +2 -2
- package/cjs/marker/base-line.d.ts +17 -0
- package/cjs/marker/base-line.js +53 -0
- package/cjs/marker/base-line.js.map +1 -0
- package/cjs/marker/{area.d.ts → cartesian/area.d.ts} +13 -8
- package/cjs/marker/{area.js → cartesian/area.js} +18 -19
- package/cjs/marker/cartesian/area.js.map +1 -0
- package/cjs/marker/cartesian/line.d.ts +27 -0
- package/cjs/marker/cartesian/line.js +153 -0
- package/cjs/marker/cartesian/line.js.map +1 -0
- package/cjs/marker/config.d.ts +80 -10
- package/cjs/marker/config.js +77 -40
- package/cjs/marker/config.js.map +1 -1
- package/cjs/marker/index.d.ts +4 -2
- package/cjs/marker/index.js +3 -2
- package/cjs/marker/index.js.map +1 -1
- package/cjs/marker/point.d.ts +1 -1
- package/cjs/marker/polar/arc-line.d.ts +22 -0
- package/cjs/marker/polar/arc-line.js +103 -0
- package/cjs/marker/polar/arc-line.js.map +1 -0
- package/cjs/marker/polar/area.d.ts +50 -0
- package/cjs/marker/polar/area.js +123 -0
- package/cjs/marker/polar/area.js.map +1 -0
- package/cjs/marker/polar/line.d.ts +1 -0
- package/cjs/marker/polar/line.js +3 -0
- package/cjs/marker/polar/line.js.map +1 -0
- package/cjs/marker/register.d.ts +5 -2
- package/cjs/marker/register.js +18 -5
- package/cjs/marker/register.js.map +1 -1
- package/cjs/marker/type.d.ts +73 -21
- package/cjs/marker/type.js +22 -15
- package/cjs/marker/type.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 +1 -0
- package/cjs/segment/register.js +7 -2
- package/cjs/segment/register.js.map +1 -1
- package/cjs/segment/segment.d.ts +7 -6
- package/cjs/segment/segment.js +7 -5
- package/cjs/segment/segment.js.map +1 -1
- package/cjs/segment/type.d.ts +22 -4
- package/cjs/segment/type.js.map +1 -1
- package/cjs/tag/tag.d.ts +5 -0
- package/cjs/tag/tag.js +11 -2
- package/cjs/tag/tag.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/label/arc.d.ts +2 -2
- package/es/label/base.d.ts +2 -2
- package/es/marker/base-line.d.ts +17 -0
- package/es/marker/base-line.js +53 -0
- package/es/marker/base-line.js.map +1 -0
- package/es/marker/{area.d.ts → cartesian/area.d.ts} +13 -8
- package/es/marker/{area.js → cartesian/area.js} +22 -23
- package/es/marker/cartesian/area.js.map +1 -0
- package/es/marker/cartesian/line.d.ts +27 -0
- package/es/marker/cartesian/line.js +159 -0
- package/es/marker/cartesian/line.js.map +1 -0
- package/es/marker/config.d.ts +80 -10
- package/es/marker/config.js +79 -40
- package/es/marker/config.js.map +1 -1
- package/es/marker/index.d.ts +4 -2
- package/es/marker/index.js +6 -2
- package/es/marker/index.js.map +1 -1
- package/es/marker/point.d.ts +1 -1
- package/es/marker/polar/arc-line.d.ts +22 -0
- package/es/marker/polar/arc-line.js +109 -0
- package/es/marker/polar/arc-line.js.map +1 -0
- package/es/marker/polar/area.d.ts +50 -0
- package/es/marker/polar/area.js +133 -0
- package/es/marker/polar/area.js.map +1 -0
- package/es/marker/polar/line.d.ts +1 -0
- package/es/marker/polar/line.js +3 -0
- package/es/marker/polar/line.js.map +1 -0
- package/es/marker/register.d.ts +5 -2
- package/es/marker/register.js +16 -4
- package/es/marker/register.js.map +1 -1
- package/es/marker/type.d.ts +73 -21
- package/es/marker/type.js +25 -15
- package/es/marker/type.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 +1 -0
- package/es/segment/register.js +5 -1
- package/es/segment/register.js.map +1 -1
- package/es/segment/segment.d.ts +7 -6
- package/es/segment/segment.js +7 -5
- package/es/segment/segment.js.map +1 -1
- package/es/segment/type.d.ts +22 -4
- package/es/segment/type.js.map +1 -1
- package/es/tag/tag.d.ts +5 -0
- package/es/tag/tag.js +11 -2
- package/es/tag/tag.js.map +1 -1
- package/package.json +5 -5
- package/cjs/marker/area.js.map +0 -1
- package/cjs/marker/line.d.ts +0 -18
- package/cjs/marker/line.js +0 -100
- package/cjs/marker/line.js.map +0 -1
- package/es/marker/area.js.map +0 -1
- package/es/marker/line.d.ts +0 -18
- package/es/marker/line.js +0 -108
- package/es/marker/line.js.map +0 -1
package/cjs/marker/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TextAlignType, TextBaselineType } from '@visactor/vrender-core';
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
2
|
+
import { ICartesianMarkAreaLabelPosition, ICartesianMarkLineLabelPosition, IPolarMarkLabelPosition } from './type';
|
|
3
|
+
export declare const DEFAULT_CARTESIAN_MARK_LINE_THEME: {
|
|
4
4
|
interactive: boolean;
|
|
5
5
|
startSymbol: {
|
|
6
6
|
visible: boolean;
|
|
@@ -17,7 +17,7 @@ export declare const DEFAULT_MARK_LINE_THEME: {
|
|
|
17
17
|
lineWidth: number;
|
|
18
18
|
};
|
|
19
19
|
label: {
|
|
20
|
-
position:
|
|
20
|
+
position: ICartesianMarkLineLabelPosition;
|
|
21
21
|
refX: number;
|
|
22
22
|
refY: number;
|
|
23
23
|
refAngle: number;
|
|
@@ -28,6 +28,8 @@ export declare const DEFAULT_MARK_LINE_THEME: {
|
|
|
28
28
|
fontSize: number;
|
|
29
29
|
fontWeight: string;
|
|
30
30
|
fontStyle: string;
|
|
31
|
+
textAlign: string;
|
|
32
|
+
textBaseline: string;
|
|
31
33
|
};
|
|
32
34
|
padding: number[];
|
|
33
35
|
panel: {
|
|
@@ -43,16 +45,82 @@ export declare const DEFAULT_MARK_LINE_THEME: {
|
|
|
43
45
|
lineDash: number[];
|
|
44
46
|
};
|
|
45
47
|
};
|
|
46
|
-
export declare const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
export declare const DEFAULT_POLAR_MARK_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: IPolarMarkLabelPosition;
|
|
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[];
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export declare const DEFAULT_CARTESIAN_MARK_AREA_THEME: {
|
|
94
|
+
interactive: boolean;
|
|
95
|
+
label: {
|
|
96
|
+
position: ICartesianMarkAreaLabelPosition;
|
|
97
|
+
textStyle: {
|
|
98
|
+
fill: string;
|
|
99
|
+
stroke: string;
|
|
100
|
+
lineWidth: number;
|
|
101
|
+
fontSize: number;
|
|
102
|
+
fontWeight: string;
|
|
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;
|
|
50
118
|
};
|
|
51
119
|
};
|
|
52
|
-
export declare const
|
|
120
|
+
export declare const DEFAULT_POLAR_MARK_AREA_THEME: {
|
|
53
121
|
interactive: boolean;
|
|
54
122
|
label: {
|
|
55
|
-
position:
|
|
123
|
+
position: IPolarMarkLabelPosition;
|
|
56
124
|
textStyle: {
|
|
57
125
|
fill: string;
|
|
58
126
|
stroke: string;
|
|
@@ -60,6 +128,8 @@ export declare const DEFAULT_MARK_AREA_THEME: {
|
|
|
60
128
|
fontSize: number;
|
|
61
129
|
fontWeight: string;
|
|
62
130
|
fontStyle: string;
|
|
131
|
+
textAlign: string;
|
|
132
|
+
textBaseline: string;
|
|
63
133
|
};
|
|
64
134
|
padding: number[];
|
|
65
135
|
panel: {
|
|
@@ -74,7 +144,7 @@ export declare const DEFAULT_MARK_AREA_THEME: {
|
|
|
74
144
|
visible: boolean;
|
|
75
145
|
};
|
|
76
146
|
};
|
|
77
|
-
export declare const
|
|
147
|
+
export declare const DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP: {
|
|
78
148
|
[K: string]: {
|
|
79
149
|
textAlign: TextAlignType;
|
|
80
150
|
textBaseline: TextBaselineType;
|
package/cjs/marker/config.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.DEFAULT_MARK_POINT_TEXT_STYLE_MAP = exports.DEFAULT_MARK_POINT_THEME = exports.
|
|
5
|
+
}), exports.DEFAULT_MARK_POINT_TEXT_STYLE_MAP = exports.DEFAULT_MARK_POINT_THEME = exports.DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP = exports.DEFAULT_POLAR_MARK_AREA_THEME = exports.DEFAULT_CARTESIAN_MARK_AREA_THEME = exports.DEFAULT_POLAR_MARK_LINE_THEME = exports.DEFAULT_CARTESIAN_MARK_LINE_THEME = void 0;
|
|
6
6
|
|
|
7
7
|
const type_1 = require("./type");
|
|
8
8
|
|
|
9
|
-
exports.
|
|
9
|
+
exports.DEFAULT_CARTESIAN_MARK_LINE_THEME = {
|
|
10
10
|
interactive: !0,
|
|
11
11
|
startSymbol: {
|
|
12
12
|
visible: !1,
|
|
@@ -23,7 +23,7 @@ exports.DEFAULT_MARK_LINE_THEME = {
|
|
|
23
23
|
lineWidth: 0
|
|
24
24
|
},
|
|
25
25
|
label: {
|
|
26
|
-
position: type_1.
|
|
26
|
+
position: type_1.ICartesianMarkLineLabelPosition.end,
|
|
27
27
|
refX: 0,
|
|
28
28
|
refY: 0,
|
|
29
29
|
refAngle: 0,
|
|
@@ -33,7 +33,9 @@ exports.DEFAULT_MARK_LINE_THEME = {
|
|
|
33
33
|
lineWidth: 0,
|
|
34
34
|
fontSize: 10,
|
|
35
35
|
fontWeight: "normal",
|
|
36
|
-
fontStyle: "normal"
|
|
36
|
+
fontStyle: "normal",
|
|
37
|
+
textAlign: "center",
|
|
38
|
+
textBaseline: "middle"
|
|
37
39
|
},
|
|
38
40
|
padding: [ 2, 2, 4, 4 ],
|
|
39
41
|
panel: {
|
|
@@ -48,54 +50,89 @@ exports.DEFAULT_MARK_LINE_THEME = {
|
|
|
48
50
|
lineWidth: 1,
|
|
49
51
|
lineDash: [ 2 ]
|
|
50
52
|
}
|
|
51
|
-
}, exports.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
insideStartBottom: {
|
|
61
|
-
textAlign: "left",
|
|
62
|
-
textBaseline: "top"
|
|
63
|
-
},
|
|
64
|
-
middle: {
|
|
65
|
-
textAlign: "center",
|
|
66
|
-
textBaseline: "middle"
|
|
67
|
-
},
|
|
68
|
-
insideMiddleTop: {
|
|
69
|
-
textAlign: "center",
|
|
70
|
-
textBaseline: "bottom"
|
|
53
|
+
}, exports.DEFAULT_POLAR_MARK_LINE_THEME = {
|
|
54
|
+
interactive: !0,
|
|
55
|
+
startSymbol: {
|
|
56
|
+
visible: !1,
|
|
57
|
+
symbolType: "triangle",
|
|
58
|
+
size: 12,
|
|
59
|
+
fill: "rgba(46, 47, 50)",
|
|
60
|
+
lineWidth: 0
|
|
71
61
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
endSymbol: {
|
|
63
|
+
visible: !0,
|
|
64
|
+
symbolType: "triangle",
|
|
65
|
+
size: 12,
|
|
66
|
+
fill: "rgba(46, 47, 50)",
|
|
67
|
+
lineWidth: 0
|
|
75
68
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
label: {
|
|
70
|
+
position: type_1.IPolarMarkLabelPosition.arcOuterMiddle,
|
|
71
|
+
refX: 0,
|
|
72
|
+
refY: 0,
|
|
73
|
+
refAngle: 0,
|
|
74
|
+
textStyle: {
|
|
75
|
+
fill: "#fff",
|
|
76
|
+
stroke: "#fff",
|
|
77
|
+
lineWidth: 0,
|
|
78
|
+
fontSize: 10,
|
|
79
|
+
fontWeight: "normal",
|
|
80
|
+
fontStyle: "normal",
|
|
81
|
+
textAlign: "center",
|
|
82
|
+
textBaseline: "middle"
|
|
83
|
+
},
|
|
84
|
+
padding: [ 2, 2, 4, 4 ],
|
|
85
|
+
panel: {
|
|
86
|
+
visible: !0,
|
|
87
|
+
cornerRadius: 0,
|
|
88
|
+
fill: "rgb(48, 115, 242)",
|
|
89
|
+
fillOpacity: .8
|
|
90
|
+
}
|
|
79
91
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
lineStyle: {
|
|
93
|
+
stroke: "#b2bacf",
|
|
94
|
+
lineWidth: 1,
|
|
95
|
+
lineDash: [ 2 ]
|
|
96
|
+
}
|
|
97
|
+
}, exports.DEFAULT_CARTESIAN_MARK_AREA_THEME = {
|
|
98
|
+
interactive: !0,
|
|
99
|
+
label: {
|
|
100
|
+
position: type_1.ICartesianMarkAreaLabelPosition.right,
|
|
101
|
+
textStyle: {
|
|
102
|
+
fill: "#fff",
|
|
103
|
+
stroke: "#fff",
|
|
104
|
+
lineWidth: 0,
|
|
105
|
+
fontSize: 10,
|
|
106
|
+
fontWeight: "normal",
|
|
107
|
+
fontStyle: "normal",
|
|
108
|
+
textAlign: "center",
|
|
109
|
+
textBaseline: "middle"
|
|
110
|
+
},
|
|
111
|
+
padding: [ 2, 2, 4, 4 ],
|
|
112
|
+
panel: {
|
|
113
|
+
visible: !0,
|
|
114
|
+
cornerRadius: 0,
|
|
115
|
+
fill: "rgb(48, 115, 242)",
|
|
116
|
+
fillOpacity: .8
|
|
117
|
+
}
|
|
83
118
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
119
|
+
areaStyle: {
|
|
120
|
+
fill: "#b2bacf",
|
|
121
|
+
visible: !0
|
|
87
122
|
}
|
|
88
|
-
}, exports.
|
|
123
|
+
}, exports.DEFAULT_POLAR_MARK_AREA_THEME = {
|
|
89
124
|
interactive: !0,
|
|
90
125
|
label: {
|
|
91
|
-
position: type_1.
|
|
126
|
+
position: type_1.IPolarMarkLabelPosition.arcOuterMiddle,
|
|
92
127
|
textStyle: {
|
|
93
128
|
fill: "#fff",
|
|
94
129
|
stroke: "#fff",
|
|
95
130
|
lineWidth: 0,
|
|
96
131
|
fontSize: 10,
|
|
97
132
|
fontWeight: "normal",
|
|
98
|
-
fontStyle: "normal"
|
|
133
|
+
fontStyle: "normal",
|
|
134
|
+
textAlign: "center",
|
|
135
|
+
textBaseline: "middle"
|
|
99
136
|
},
|
|
100
137
|
padding: [ 2, 2, 4, 4 ],
|
|
101
138
|
panel: {
|
|
@@ -109,7 +146,7 @@ exports.DEFAULT_MARK_LINE_THEME = {
|
|
|
109
146
|
fill: "#b2bacf",
|
|
110
147
|
visible: !0
|
|
111
148
|
}
|
|
112
|
-
}, exports.
|
|
149
|
+
}, exports.DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP = {
|
|
113
150
|
left: {
|
|
114
151
|
textAlign: "right",
|
|
115
152
|
textBaseline: "middle"
|
package/cjs/marker/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/marker/config.ts"],"names":[],"mappings":";;;AACA,iCAAwE;AAE3D,QAAA,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,6BAAsB,CAAC,GAAG;QACpC,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE;YACT,IAA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B,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 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 },\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 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 },\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 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"]}
|
|
1
|
+
{"version":3,"sources":["../src/marker/config.ts"],"names":[],"mappings":";;;AACA,iCAAmH;AAEtG,QAAA,iCAAiC,GAAG;IAC/C,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,sCAA+B,CAAC,GAAG;QAC7C,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE;YACT,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,QAAQ;YACnB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EAAE;YACR,KAAK,EAAE;gBACL,IAAI,EAAE,KAAK;gBACX,MAAM,EAAE,kBAAkB;aAC3B;SACF;QACD,SAAS,EAAE;YACT,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,CAAC;SACb;KACF;IACD,WAAW,EAAE;QACX,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,EAAE;QACR,WAAW,EAAE;YACX,UAAU,EAAE,MAAM;YAClB,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,GAAG;YAChB,IAAI,EAAE,EAAE;SACT;QACD,SAAS,EAAE;YACT,EAAE,EAAE,CAAC;YACL,EAAE,EAAE,CAAC;SACN;QACD,UAAU,EAAE;YACV,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;SACX;QACD,aAAa,EAAE;YACb,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;SACZ;KACF;CACF,CAAC;AAEW,QAAA,iCAAiC,GAK1C;IACF,GAAG,EAAE;QACH,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,QAAQ;KACvB;IACD,MAAM,EAAE;QACN,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,KAAK;KACpB;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 { ICartesianMarkAreaLabelPosition, ICartesianMarkLineLabelPosition, IPolarMarkLabelPosition } from './type';\n\nexport const DEFAULT_CARTESIAN_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: ICartesianMarkLineLabelPosition.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_POLAR_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: IPolarMarkLabelPosition.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_CARTESIAN_MARK_AREA_THEME = {\n interactive: true,\n label: {\n position: ICartesianMarkAreaLabelPosition.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_POLAR_MARK_AREA_THEME = {\n interactive: true,\n label: {\n position: IPolarMarkLabelPosition.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/cjs/marker/index.d.ts
CHANGED
package/cjs/marker/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), __exportStar(require("./type"), exports), __exportStar(require("./line"), exports),
|
|
21
|
-
__exportStar(require("./area"), exports), __exportStar(require("./
|
|
20
|
+
}), __exportStar(require("./type"), exports), __exportStar(require("./cartesian/line"), exports),
|
|
21
|
+
__exportStar(require("./cartesian/area"), exports), __exportStar(require("./polar/arc-line"), exports),
|
|
22
|
+
__exportStar(require("./polar/area"), exports), __exportStar(require("./point"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/cjs/marker/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/marker/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,
|
|
1
|
+
{"version":3,"sources":["../src/marker/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AAEjC,+CAA6B;AAC7B,0CAAwB","file":"index.js","sourcesContent":["export * from './type';\nexport * from './cartesian/line';\nexport * from './cartesian/area';\nexport * from './polar/arc-line';\n// export * from './polar/line';\nexport * from './polar/area';\nexport * from './point';\n"]}
|
package/cjs/marker/point.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export declare class MarkPoint extends Marker<MarkPointAttrs> {
|
|
|
72
72
|
protected setItemAttributes(item: ISymbol | Tag | IImage | IRichText, itemContent: IItemContent, itemPosition: Point, itemType: 'symbol' | 'text' | 'image' | 'richText' | 'custom'): void;
|
|
73
73
|
protected getItemDx(item: ISymbol | Tag | IImage | IRichText, position: keyof typeof IMarkPointItemPosition, style?: IImageGraphicAttribute | IRichTextGraphicAttribute): number;
|
|
74
74
|
protected getItemDy(item: ISymbol | Tag | IImage | IRichText, position: keyof typeof IMarkPointItemPosition, style?: IImageGraphicAttribute | IRichTextGraphicAttribute): number;
|
|
75
|
-
protected initItem(itemContent: IItemContent, itemPosition: Point): IGroup | Tag |
|
|
75
|
+
protected initItem(itemContent: IItemContent, itemPosition: Point): IGroup | Tag | IRichText | ISymbol | IImage;
|
|
76
76
|
protected getItemLineAttr(itemLine: IItemLine, position: Point, itemPosition: Point): Point[];
|
|
77
77
|
protected setItemLineAttr(itemLine: IItemLine, position: Point, itemPosition: Point, visible: boolean): void;
|
|
78
78
|
protected getDecorativeLineAttr(itemLine: IItemLine, itemPosition: Point): {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ArcSegment } from '../../segment';
|
|
2
|
+
import { BaseMarkLine } from '../base-line';
|
|
3
|
+
import { IPolarMarkLabelPosition } from '../type';
|
|
4
|
+
import type { PolarMarkArcLineAttrs } from '../type';
|
|
5
|
+
import type { ComponentOptions } from '../../interface';
|
|
6
|
+
export declare class PolarMarkArcLine extends BaseMarkLine<IPolarMarkLabelPosition> {
|
|
7
|
+
name: string;
|
|
8
|
+
static defaultAttributes: Partial<PolarMarkArcLineAttrs>;
|
|
9
|
+
protected _line: ArcSegment;
|
|
10
|
+
constructor(attributes: PolarMarkArcLineAttrs, options?: ComponentOptions);
|
|
11
|
+
protected isValidPoints(): boolean;
|
|
12
|
+
protected getPositionByDirection(direction: IPolarMarkLabelPosition): {
|
|
13
|
+
position: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
angle: number;
|
|
18
|
+
};
|
|
19
|
+
protected setLabelPos(): void;
|
|
20
|
+
protected createSegment(): ArcSegment;
|
|
21
|
+
protected setLineAttributes(): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.PolarMarkArcLine = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils"), segment_1 = require("../../segment"), register_1 = require("../register"), constant_1 = require("../../constant"), base_line_1 = require("../base-line"), type_1 = require("../type"), config_1 = require("../config");
|
|
8
|
+
|
|
9
|
+
(0, register_1.loadPolarMarkArcLineComponent)();
|
|
10
|
+
|
|
11
|
+
class PolarMarkArcLine extends base_line_1.BaseMarkLine {
|
|
12
|
+
constructor(attributes, options) {
|
|
13
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : (0, vutils_1.merge)({}, PolarMarkArcLine.defaultAttributes, attributes)),
|
|
14
|
+
this.name = "polarMarkArcLine";
|
|
15
|
+
}
|
|
16
|
+
isValidPoints() {
|
|
17
|
+
return !0;
|
|
18
|
+
}
|
|
19
|
+
getPositionByDirection(direction) {
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
21
|
+
const {center: center, radius: radius, startAngle: startAngle, endAngle: endAngle, label: label} = this.attribute, {refX: refX = 0, refY: refY = 0} = label, labelRectHeight = Math.abs((null !== (_b = null === (_a = this._label.getTextShape().AABBBounds) || void 0 === _a ? void 0 : _a.y2) && void 0 !== _b ? _b : 0) - (null !== (_d = null === (_c = this._label.getTextShape()) || void 0 === _c ? void 0 : _c.AABBBounds.y1) && void 0 !== _d ? _d : 0)), labelTextHeight = Math.abs((null !== (_f = null === (_e = this._label.getBgRect().AABBBounds) || void 0 === _e ? void 0 : _e.y2) && void 0 !== _f ? _f : 0) - (null !== (_h = null === (_g = this._label.getBgRect()) || void 0 === _g ? void 0 : _g.AABBBounds.y1) && void 0 !== _h ? _h : 0)), labelHeight = Math.max(labelRectHeight, labelTextHeight);
|
|
22
|
+
let angle, orthogonalOffsetDirection;
|
|
23
|
+
switch (direction) {
|
|
24
|
+
case type_1.IPolarMarkLabelPosition.center:
|
|
25
|
+
angle = (startAngle + endAngle) / 2, orthogonalOffsetDirection = 0;
|
|
26
|
+
break;
|
|
27
|
+
|
|
28
|
+
case type_1.IPolarMarkLabelPosition.arcInnerStart:
|
|
29
|
+
angle = startAngle, orthogonalOffsetDirection = -1;
|
|
30
|
+
break;
|
|
31
|
+
|
|
32
|
+
case type_1.IPolarMarkLabelPosition.arcOuterStart:
|
|
33
|
+
angle = startAngle, orthogonalOffsetDirection = 1;
|
|
34
|
+
break;
|
|
35
|
+
|
|
36
|
+
case type_1.IPolarMarkLabelPosition.arcInnerEnd:
|
|
37
|
+
angle = endAngle, orthogonalOffsetDirection = -1;
|
|
38
|
+
break;
|
|
39
|
+
|
|
40
|
+
case type_1.IPolarMarkLabelPosition.arcOuterEnd:
|
|
41
|
+
angle = endAngle, orthogonalOffsetDirection = 1;
|
|
42
|
+
break;
|
|
43
|
+
|
|
44
|
+
case type_1.IPolarMarkLabelPosition.arcInnerMiddle:
|
|
45
|
+
angle = (startAngle + endAngle) / 2, orthogonalOffsetDirection = -1;
|
|
46
|
+
break;
|
|
47
|
+
|
|
48
|
+
case type_1.IPolarMarkLabelPosition.arcOuterMiddle:
|
|
49
|
+
angle = (startAngle + endAngle) / 2, orthogonalOffsetDirection = 1;
|
|
50
|
+
break;
|
|
51
|
+
|
|
52
|
+
default:
|
|
53
|
+
angle = (startAngle + endAngle) / 2, orthogonalOffsetDirection = -1;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
position: {
|
|
57
|
+
x: center.x + (radius + orthogonalOffsetDirection * labelHeight / 2 + refY) * Math.cos(angle) + refX * Math.cos(angle - Math.PI / 2),
|
|
58
|
+
y: center.y + (radius + orthogonalOffsetDirection * labelHeight / 2 + refY) * Math.sin(angle) + refX * Math.sin(angle - Math.PI / 2)
|
|
59
|
+
},
|
|
60
|
+
angle: angle
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
setLabelPos() {
|
|
64
|
+
var _a;
|
|
65
|
+
super.setLabelPos();
|
|
66
|
+
const {label: label = {}} = this.attribute, {position: position = "arcInnerMiddle", autoRotate: autoRotate = !0} = label, labelAttr = this.getPositionByDirection(position);
|
|
67
|
+
this._label.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
|
|
68
|
+
angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = label.refAngle) && void 0 !== _a ? _a : 0) : 0
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
createSegment() {
|
|
72
|
+
const {center: center, radius: radius, startAngle: startAngle, endAngle: endAngle, startSymbol: startSymbol, endSymbol: endSymbol, lineStyle: lineStyle, state: state} = this.attribute;
|
|
73
|
+
return new segment_1.ArcSegment({
|
|
74
|
+
center: center,
|
|
75
|
+
radius: radius,
|
|
76
|
+
startAngle: startAngle,
|
|
77
|
+
endAngle: endAngle,
|
|
78
|
+
startSymbol: startSymbol,
|
|
79
|
+
endSymbol: endSymbol,
|
|
80
|
+
lineStyle: lineStyle,
|
|
81
|
+
state: {
|
|
82
|
+
line: (0, vutils_1.merge)({}, constant_1.DEFAULT_STATES, null == state ? void 0 : state.line),
|
|
83
|
+
startSymbol: (0, vutils_1.merge)({}, constant_1.DEFAULT_STATES, null == state ? void 0 : state.lineStartSymbol),
|
|
84
|
+
endSymbol: (0, vutils_1.merge)({}, constant_1.DEFAULT_STATES, null == state ? void 0 : state.lineEndSymbol)
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
setLineAttributes() {
|
|
89
|
+
const {center: center, radius: radius, startAngle: startAngle, endAngle: endAngle, startSymbol: startSymbol, endSymbol: endSymbol, lineStyle: lineStyle} = this.attribute;
|
|
90
|
+
this._line && this._line.setAttributes({
|
|
91
|
+
center: center,
|
|
92
|
+
radius: radius,
|
|
93
|
+
startAngle: startAngle,
|
|
94
|
+
endAngle: endAngle,
|
|
95
|
+
startSymbol: startSymbol,
|
|
96
|
+
endSymbol: endSymbol,
|
|
97
|
+
lineStyle: lineStyle
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
exports.PolarMarkArcLine = PolarMarkArcLine, PolarMarkArcLine.defaultAttributes = config_1.DEFAULT_POLAR_MARK_LINE_THEME;
|
|
103
|
+
//# sourceMappingURL=arc-line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/marker/polar/arc-line.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,2CAA2C;AAC3C,0CAA4D;AAC5D,6CAAgD;AAChD,4CAA4C;AAC5C,kCAAkD;AAGlD,sCAA0D;AAG1D,IAAA,wCAA6B,GAAE,CAAC;AAChC,MAAa,gBAAiB,SAAQ,wBAAqC;IAOzE,YAAY,UAAiC,EAAE,OAA0B;QACvE,KAAK,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,EAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,cAA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,KAAK,uBAAL,KAAK,CAAE,eAAe,CAAC;gBAC9D,SAAS,EAAE,IAAA,cAAK,EAAC,EAAE,EAAE,yBAAc,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,CAAC;aAC3D;SACF,CAAC,CAAC;IACL,CAAC;IAES,iBAAiB;QACzB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI;aACrF,SAAkC,CAAC;QACtC,IAAI,IAAI,CAAC,KAAK,EAAE;YACb,IAAI,CAAC,KAAa,CAAC,aAAa,CAAC;gBAChC,MAAM;gBACN,MAAM;gBACN,UAAU;gBACV,QAAQ;gBACR,WAAW;gBACX,SAAS;gBACT,SAAS;aACV,CAAC,CAAC;SACJ;IACH,CAAC;;AA9HH,4CA+HC;AA5HQ,kCAAiB,GACtB,sCAAiE,CAAC","file":"arc-line.js","sourcesContent":["import { merge } from '@visactor/vutils';\nimport { ArcSegment } from '../../segment';\nimport { loadPolarMarkArcLineComponent } from '../register';\nimport { DEFAULT_STATES } from '../../constant';\nimport { BaseMarkLine } from '../base-line';\nimport { IPolarMarkLabelPosition } from '../type';\n// eslint-disable-next-line no-duplicate-imports\nimport type { PolarMarkArcLineAttrs } from '../type';\nimport { DEFAULT_POLAR_MARK_LINE_THEME } from '../config';\nimport type { ComponentOptions } from '../../interface';\n\nloadPolarMarkArcLineComponent();\nexport class PolarMarkArcLine extends BaseMarkLine<IPolarMarkLabelPosition> {\n name = 'polarMarkArcLine';\n // eslint-disable-next-line max-len\n static defaultAttributes: Partial<PolarMarkArcLineAttrs> =\n DEFAULT_POLAR_MARK_LINE_THEME as unknown as PolarMarkArcLineAttrs;\n protected _line!: ArcSegment;\n\n constructor(attributes: PolarMarkArcLineAttrs, options?: ComponentOptions) {\n super(options?.skipDefault ? attributes : merge({}, PolarMarkArcLine.defaultAttributes, attributes));\n }\n\n protected isValidPoints() {\n return true;\n }\n\n protected getPositionByDirection(direction: IPolarMarkLabelPosition) {\n const { center, radius, startAngle, endAngle, label } = this.attribute as PolarMarkArcLineAttrs;\n const { refX = 0, refY = 0 } = label;\n // eslint-disable-next-line max-len\n const labelRectHeight = Math.abs(\n (this._label.getTextShape().AABBBounds?.y2 ?? 0) - (this._label.getTextShape()?.AABBBounds.y1 ?? 0)\n );\n // eslint-disable-next-line max-len\n const labelTextHeight = Math.abs(\n (this._label.getBgRect().AABBBounds?.y2 ?? 0) - (this._label.getBgRect()?.AABBBounds.y1 ?? 0)\n );\n const labelHeight = Math.max(labelRectHeight, labelTextHeight);\n\n let angle;\n // tag在正交方向是向内偏移,还是向外偏移\n // 不偏移: 0, 内: -1, 外: 1\n let orthogonalOffsetDirection;\n\n switch (direction) {\n case IPolarMarkLabelPosition.center:\n angle = (startAngle + endAngle) / 2;\n orthogonalOffsetDirection = 0;\n break;\n case IPolarMarkLabelPosition.arcInnerStart:\n angle = startAngle;\n orthogonalOffsetDirection = -1;\n break;\n case IPolarMarkLabelPosition.arcOuterStart:\n angle = startAngle;\n orthogonalOffsetDirection = 1;\n break;\n case IPolarMarkLabelPosition.arcInnerEnd:\n angle = endAngle;\n orthogonalOffsetDirection = -1;\n break;\n case IPolarMarkLabelPosition.arcOuterEnd:\n angle = endAngle;\n orthogonalOffsetDirection = 1;\n break;\n case IPolarMarkLabelPosition.arcInnerMiddle:\n angle = (startAngle + endAngle) / 2;\n orthogonalOffsetDirection = -1;\n break;\n case IPolarMarkLabelPosition.arcOuterMiddle:\n angle = (startAngle + endAngle) / 2;\n orthogonalOffsetDirection = 1;\n break;\n default: // default arcInnerMiddle\n angle = (startAngle + endAngle) / 2;\n orthogonalOffsetDirection = -1;\n }\n\n return {\n position: {\n x:\n center.x +\n (radius + (orthogonalOffsetDirection * labelHeight) / 2 + refY) * Math.cos(angle) +\n refX * Math.cos(angle - Math.PI / 2),\n y:\n center.y +\n (radius + (orthogonalOffsetDirection * labelHeight) / 2 + refY) * Math.sin(angle) +\n refX * Math.sin(angle - Math.PI / 2)\n },\n angle\n };\n }\n\n protected setLabelPos(): void {\n super.setLabelPos();\n const { label = {} } = this.attribute as PolarMarkArcLineAttrs;\n const { position = 'arcInnerMiddle', autoRotate = true } = label;\n const labelAttr = this.getPositionByDirection(position as any);\n this._label.setAttributes({\n ...labelAttr.position,\n angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (label.refAngle ?? 0) : 0\n });\n }\n\n protected createSegment() {\n const { center, radius, startAngle, endAngle, startSymbol, endSymbol, lineStyle, state } = this\n .attribute as PolarMarkArcLineAttrs;\n return new ArcSegment({\n center,\n radius,\n startAngle,\n endAngle,\n startSymbol,\n endSymbol,\n lineStyle,\n state: {\n line: merge({}, DEFAULT_STATES, state?.line),\n startSymbol: merge({}, DEFAULT_STATES, state?.lineStartSymbol),\n endSymbol: merge({}, DEFAULT_STATES, state?.lineEndSymbol)\n }\n });\n }\n\n protected setLineAttributes() {\n const { center, radius, startAngle, endAngle, startSymbol, endSymbol, lineStyle } = this\n .attribute as PolarMarkArcLineAttrs;\n if (this._line) {\n (this._line as any).setAttributes({\n center,\n radius,\n startAngle,\n endAngle,\n startSymbol,\n endSymbol,\n lineStyle\n });\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { IArc, IGroup } from '@visactor/vrender-core';
|
|
2
|
+
import { Tag } from '../../tag';
|
|
3
|
+
import { Marker } from '../base';
|
|
4
|
+
import { IPolarMarkLabelPosition, type PolarMarkAreaAttrs } from '../type';
|
|
5
|
+
import type { ComponentOptions } from '../../interface';
|
|
6
|
+
export declare class PolarMarkArea extends Marker<PolarMarkAreaAttrs> {
|
|
7
|
+
name: string;
|
|
8
|
+
static defaultAttributes: {
|
|
9
|
+
interactive: boolean;
|
|
10
|
+
label: {
|
|
11
|
+
position: IPolarMarkLabelPosition;
|
|
12
|
+
textStyle: {
|
|
13
|
+
fill: string;
|
|
14
|
+
stroke: string;
|
|
15
|
+
lineWidth: number;
|
|
16
|
+
fontSize: number;
|
|
17
|
+
fontWeight: string;
|
|
18
|
+
fontStyle: string;
|
|
19
|
+
textAlign: string;
|
|
20
|
+
textBaseline: string;
|
|
21
|
+
};
|
|
22
|
+
padding: number[];
|
|
23
|
+
panel: {
|
|
24
|
+
visible: boolean;
|
|
25
|
+
cornerRadius: number;
|
|
26
|
+
fill: string;
|
|
27
|
+
fillOpacity: number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
areaStyle: {
|
|
31
|
+
fill: string;
|
|
32
|
+
visible: boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
private _area;
|
|
36
|
+
getArea(): IArc;
|
|
37
|
+
getLabel(): Tag;
|
|
38
|
+
constructor(attributes: PolarMarkAreaAttrs, options?: ComponentOptions);
|
|
39
|
+
protected getPositionByDirection(direction: string): {
|
|
40
|
+
position: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
};
|
|
44
|
+
angle: number;
|
|
45
|
+
};
|
|
46
|
+
protected setLabelPos(): void;
|
|
47
|
+
protected initMarker(container: IGroup): void;
|
|
48
|
+
protected updateMarker(): void;
|
|
49
|
+
protected isValidPoints(): boolean;
|
|
50
|
+
}
|