@unovis/ts 1.6.0-pre.2 → 1.6.1-pre.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/components/area/index.js +2 -1
- package/components/area/index.js.map +1 -1
- package/components/axis/config.d.ts +4 -0
- package/components/axis/config.js +2 -2
- package/components/axis/config.js.map +1 -1
- package/components/axis/index.d.ts +0 -1
- package/components/axis/index.js +58 -19
- package/components/axis/index.js.map +1 -1
- package/components/axis/style.d.ts +40 -1
- package/components/axis/style.js +34 -35
- package/components/axis/style.js.map +1 -1
- package/components/brush/config.d.ts +1 -1
- package/components/brush/config.js.map +1 -1
- package/components/bullet-legend/config.d.ts +2 -0
- package/components/bullet-legend/config.js +1 -0
- package/components/bullet-legend/config.js.map +1 -1
- package/components/bullet-legend/index.js +10 -2
- package/components/bullet-legend/index.js.map +1 -1
- package/components/bullet-legend/modules/shape.d.ts +1 -0
- package/components/bullet-legend/modules/shape.js +61 -41
- package/components/bullet-legend/modules/shape.js.map +1 -1
- package/components/bullet-legend/types.d.ts +1 -1
- package/components/bullet-legend/types.js.map +1 -1
- package/components/crosshair/config.d.ts +20 -7
- package/components/crosshair/config.js +1 -1
- package/components/crosshair/config.js.map +1 -1
- package/components/crosshair/index.d.ts +8 -7
- package/components/crosshair/index.js +144 -72
- package/components/crosshair/index.js.map +1 -1
- package/components/graph/config.d.ts +8 -0
- package/components/graph/config.js +1 -1
- package/components/graph/config.js.map +1 -1
- package/components/graph/index.d.ts +1 -0
- package/components/graph/index.js +14 -9
- package/components/graph/index.js.map +1 -1
- package/components/graph/modules/layout.js +33 -31
- package/components/graph/modules/layout.js.map +1 -1
- package/components/graph/modules/link/index.js +1 -1
- package/components/graph/modules/link/index.js.map +1 -1
- package/components/graph/types.d.ts +2 -1
- package/components/graph/types.js.map +1 -1
- package/components/nested-donut/config.d.ts +1 -1
- package/components/nested-donut/config.js.map +1 -1
- package/components/plotband/config.d.ts +59 -0
- package/components/plotband/config.js +9 -0
- package/components/plotband/config.js.map +1 -0
- package/components/plotband/constants.d.ts +5 -0
- package/components/plotband/constants.js +413 -0
- package/components/plotband/constants.js.map +1 -0
- package/components/plotband/index.d.ts +15 -0
- package/components/plotband/index.js +92 -0
- package/components/plotband/index.js.map +1 -0
- package/components/plotband/style.d.ts +4 -0
- package/components/plotband/style.js +38 -0
- package/components/plotband/style.js.map +1 -0
- package/components/plotband/types.d.ts +51 -0
- package/components/plotband/types.js +27 -0
- package/components/plotband/types.js.map +1 -0
- package/components/plotline/config.d.ts +91 -0
- package/components/plotline/config.js +9 -0
- package/components/plotline/config.js.map +1 -0
- package/components/plotline/constants.d.ts +6 -0
- package/components/plotline/constants.js +58 -0
- package/components/plotline/constants.js.map +1 -0
- package/components/plotline/index.d.ts +14 -0
- package/components/plotline/index.js +102 -0
- package/components/plotline/index.js.map +1 -0
- package/components/plotline/style.d.ts +4 -0
- package/components/plotline/style.js +42 -0
- package/components/plotline/style.js.map +1 -0
- package/components/plotline/types.d.ts +53 -0
- package/components/plotline/types.js +33 -0
- package/components/plotline/types.js.map +1 -0
- package/components/rolling-pin-legend/config.d.ts +19 -0
- package/components/rolling-pin-legend/config.js +11 -0
- package/components/rolling-pin-legend/config.js.map +1 -0
- package/components/rolling-pin-legend/index.d.ts +16 -0
- package/components/rolling-pin-legend/index.js +69 -0
- package/components/rolling-pin-legend/index.js.map +1 -0
- package/components/rolling-pin-legend/style.d.ts +22 -0
- package/components/rolling-pin-legend/style.js +39 -0
- package/components/rolling-pin-legend/style.js.map +1 -0
- package/components/rolling-pin-legend/types.d.ts +1 -0
- package/components/rolling-pin-legend/types.js +2 -0
- package/components/rolling-pin-legend/types.js.map +1 -0
- package/components/scatter/index.d.ts +1 -0
- package/components/scatter/index.js +11 -1
- package/components/scatter/index.js.map +1 -1
- package/components/timeline/config.d.ts +65 -14
- package/components/timeline/config.js +15 -1
- package/components/timeline/config.js.map +1 -1
- package/components/timeline/constants.d.ts +3 -0
- package/components/timeline/constants.js +6 -0
- package/components/timeline/constants.js.map +1 -0
- package/components/timeline/index.d.ts +21 -10
- package/components/timeline/index.js +380 -95
- package/components/timeline/index.js.map +1 -1
- package/components/timeline/style.d.ts +7 -0
- package/components/timeline/style.js +40 -1
- package/components/timeline/style.js.map +1 -1
- package/components/timeline/types.d.ts +62 -0
- package/components/timeline/types.js +2 -0
- package/components/timeline/types.js.map +1 -0
- package/components/timeline/utils.d.ts +2 -0
- package/components/timeline/utils.js +16 -0
- package/components/timeline/utils.js.map +1 -0
- package/components/tooltip/index.js +4 -3
- package/components/tooltip/index.js.map +1 -1
- package/components/treemap/config.d.ts +52 -0
- package/components/treemap/config.js +6 -0
- package/components/treemap/config.js.map +1 -0
- package/components/treemap/index.d.ts +18 -0
- package/components/treemap/index.js +274 -0
- package/components/treemap/index.js.map +1 -0
- package/components/treemap/style.d.ts +25 -0
- package/components/treemap/style.js +69 -0
- package/components/treemap/style.js.map +1 -0
- package/components/treemap/types.d.ts +11 -0
- package/components/treemap/types.js +2 -0
- package/components/treemap/types.js.map +1 -0
- package/components/xy-labels/index.js +1 -1
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +10 -2
- package/components.js +4 -0
- package/components.js.map +1 -1
- package/containers/single-container/index.js +3 -1
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/config.d.ts +2 -0
- package/containers/xy-container/config.js +1 -1
- package/containers/xy-container/config.js.map +1 -1
- package/containers/xy-container/index.js +17 -7
- package/containers/xy-container/index.js.map +1 -1
- package/core/component/index.d.ts +4 -0
- package/core/component/index.js +6 -0
- package/core/component/index.js.map +1 -1
- package/core/xy-component/index.d.ts +1 -0
- package/core/xy-component/index.js +3 -1
- package/core/xy-component/index.js.map +1 -1
- package/index.js +10 -3
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/styles/index.js +1 -0
- package/styles/index.js.map +1 -1
- package/types/data.d.ts +5 -0
- package/types/data.js +7 -0
- package/types/data.js.map +1 -1
- package/types/position.d.ts +2 -1
- package/types/position.js +1 -0
- package/types/position.js.map +1 -1
- package/types/text.d.ts +1 -1
- package/types/text.js.map +1 -1
- package/types.d.ts +5 -0
- package/types.js +6 -1
- package/types.js.map +1 -1
- package/utils/color.d.ts +7 -0
- package/utils/color.js +14 -2
- package/utils/color.js.map +1 -1
- package/utils/data.d.ts +4 -4
- package/utils/data.js +41 -10
- package/utils/data.js.map +1 -1
- package/utils/index.js +3 -3
- package/utils/path.d.ts +8 -0
- package/utils/path.js +109 -1
- package/utils/path.js.map +1 -1
- package/utils/text.d.ts +3 -2
- package/utils/text.js +22 -10
- package/utils/text.js.map +1 -1
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import { PlotbandLabelPosition } from './types.js';
|
|
2
|
+
|
|
3
|
+
const HORIZONTAL_X = {
|
|
4
|
+
[PlotbandLabelPosition.TopLeftOutside]: ({ startX, offsetX, offsetY }) => ({
|
|
5
|
+
x: startX - offsetX,
|
|
6
|
+
y: offsetY,
|
|
7
|
+
textAnchor: 'end',
|
|
8
|
+
dominantBaseline: 'text-before-edge',
|
|
9
|
+
}),
|
|
10
|
+
[PlotbandLabelPosition.TopLeftInside]: ({ startX, offsetX, offsetY }) => ({
|
|
11
|
+
x: startX + offsetX,
|
|
12
|
+
y: offsetY,
|
|
13
|
+
textAnchor: 'start',
|
|
14
|
+
dominantBaseline: 'text-before-edge',
|
|
15
|
+
}),
|
|
16
|
+
[PlotbandLabelPosition.TopOutside]: ({ startX, width, offsetY }) => ({
|
|
17
|
+
x: startX + width / 2,
|
|
18
|
+
y: offsetY,
|
|
19
|
+
textAnchor: 'middle',
|
|
20
|
+
dominantBaseline: 'text-before-edge',
|
|
21
|
+
}),
|
|
22
|
+
[PlotbandLabelPosition.TopInside]: ({ startX, width, offsetY }) => ({
|
|
23
|
+
x: startX + width / 2,
|
|
24
|
+
y: offsetY,
|
|
25
|
+
textAnchor: 'middle',
|
|
26
|
+
dominantBaseline: 'text-before-edge',
|
|
27
|
+
}),
|
|
28
|
+
[PlotbandLabelPosition.TopRightOutside]: ({ startX, width, offsetX, offsetY }) => ({
|
|
29
|
+
x: startX + width + offsetX,
|
|
30
|
+
y: offsetY,
|
|
31
|
+
textAnchor: 'start',
|
|
32
|
+
dominantBaseline: 'text-before-edge',
|
|
33
|
+
}),
|
|
34
|
+
[PlotbandLabelPosition.TopRightInside]: ({ startX, width, offsetX, offsetY }) => ({
|
|
35
|
+
x: startX + width - offsetX,
|
|
36
|
+
y: offsetY,
|
|
37
|
+
textAnchor: 'end',
|
|
38
|
+
dominantBaseline: 'text-before-edge',
|
|
39
|
+
}),
|
|
40
|
+
[PlotbandLabelPosition.RightOutside]: ({ startX, width, height, offsetX }) => ({
|
|
41
|
+
x: startX + width + offsetX,
|
|
42
|
+
y: height / 2,
|
|
43
|
+
textAnchor: 'start',
|
|
44
|
+
dominantBaseline: 'middle',
|
|
45
|
+
}),
|
|
46
|
+
[PlotbandLabelPosition.RightInside]: ({ startX, width, height, offsetX }) => ({
|
|
47
|
+
x: startX + width - offsetX,
|
|
48
|
+
y: height / 2,
|
|
49
|
+
textAnchor: 'end',
|
|
50
|
+
dominantBaseline: 'middle',
|
|
51
|
+
}),
|
|
52
|
+
[PlotbandLabelPosition.BottomRightOutside]: ({ startX, width, height, offsetX, offsetY }) => ({
|
|
53
|
+
x: startX + width + offsetX,
|
|
54
|
+
y: height - offsetY,
|
|
55
|
+
textAnchor: 'start',
|
|
56
|
+
dominantBaseline: 'text-after-edge',
|
|
57
|
+
}),
|
|
58
|
+
[PlotbandLabelPosition.BottomRightInside]: ({ startX, width, height, offsetX, offsetY }) => ({
|
|
59
|
+
x: startX + width - offsetX,
|
|
60
|
+
y: height - offsetY,
|
|
61
|
+
textAnchor: 'end',
|
|
62
|
+
dominantBaseline: 'text-after-edge',
|
|
63
|
+
}),
|
|
64
|
+
[PlotbandLabelPosition.BottomOutside]: ({ startX, width, height, offsetY }) => ({
|
|
65
|
+
x: startX + width / 2,
|
|
66
|
+
y: height - offsetY,
|
|
67
|
+
textAnchor: 'middle',
|
|
68
|
+
dominantBaseline: 'text-after-edge',
|
|
69
|
+
}),
|
|
70
|
+
[PlotbandLabelPosition.BottomInside]: ({ startX, width, height, offsetY }) => ({
|
|
71
|
+
x: startX + width / 2,
|
|
72
|
+
y: height - offsetY,
|
|
73
|
+
textAnchor: 'middle',
|
|
74
|
+
dominantBaseline: 'text-after-edge',
|
|
75
|
+
}),
|
|
76
|
+
[PlotbandLabelPosition.BottomLeftOutside]: ({ startX, height, offsetX, offsetY }) => ({
|
|
77
|
+
x: startX - offsetX,
|
|
78
|
+
y: height - offsetY,
|
|
79
|
+
textAnchor: 'end',
|
|
80
|
+
dominantBaseline: 'text-after-edge',
|
|
81
|
+
}),
|
|
82
|
+
[PlotbandLabelPosition.BottomLeftInside]: ({ startX, height, offsetX, offsetY }) => ({
|
|
83
|
+
x: startX + offsetX,
|
|
84
|
+
y: height - offsetY,
|
|
85
|
+
textAnchor: 'start',
|
|
86
|
+
dominantBaseline: 'text-after-edge',
|
|
87
|
+
}),
|
|
88
|
+
[PlotbandLabelPosition.LeftOutside]: ({ startX, height, offsetX }) => ({
|
|
89
|
+
x: startX - offsetX,
|
|
90
|
+
y: height / 2,
|
|
91
|
+
textAnchor: 'end',
|
|
92
|
+
dominantBaseline: 'middle',
|
|
93
|
+
}),
|
|
94
|
+
[PlotbandLabelPosition.LeftInside]: ({ startX, height, offsetX }) => ({
|
|
95
|
+
x: startX + offsetX,
|
|
96
|
+
y: height / 2,
|
|
97
|
+
textAnchor: 'start',
|
|
98
|
+
dominantBaseline: 'middle',
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
const VERTICAL_X = {
|
|
102
|
+
[PlotbandLabelPosition.TopLeftOutside]: ({ startX, offsetX, offsetY }) => ({
|
|
103
|
+
x: startX - offsetX,
|
|
104
|
+
y: offsetY,
|
|
105
|
+
textAnchor: 'end',
|
|
106
|
+
dominantBaseline: 'text-after-edge',
|
|
107
|
+
}),
|
|
108
|
+
[PlotbandLabelPosition.TopLeftInside]: ({ startX, offsetX, offsetY }) => ({
|
|
109
|
+
x: startX + offsetX,
|
|
110
|
+
y: offsetY,
|
|
111
|
+
textAnchor: 'end',
|
|
112
|
+
dominantBaseline: 'text-before-edge',
|
|
113
|
+
}),
|
|
114
|
+
[PlotbandLabelPosition.TopOutside]: ({ startX, width, offsetY }) => ({
|
|
115
|
+
x: startX + width / 2,
|
|
116
|
+
y: offsetY,
|
|
117
|
+
textAnchor: 'end',
|
|
118
|
+
dominantBaseline: 'middle',
|
|
119
|
+
}),
|
|
120
|
+
[PlotbandLabelPosition.TopInside]: ({ startX, width, offsetY }) => ({
|
|
121
|
+
x: startX + width / 2,
|
|
122
|
+
y: offsetY,
|
|
123
|
+
textAnchor: 'end',
|
|
124
|
+
dominantBaseline: 'middle',
|
|
125
|
+
}),
|
|
126
|
+
[PlotbandLabelPosition.TopRightOutside]: ({ startX, width, offsetX, offsetY }) => ({
|
|
127
|
+
x: startX + width + offsetX,
|
|
128
|
+
y: offsetY,
|
|
129
|
+
textAnchor: 'end',
|
|
130
|
+
dominantBaseline: 'text-before-edge',
|
|
131
|
+
}),
|
|
132
|
+
[PlotbandLabelPosition.TopRightInside]: ({ startX, width, offsetX, offsetY }) => ({
|
|
133
|
+
x: startX + width - offsetX,
|
|
134
|
+
y: offsetY,
|
|
135
|
+
textAnchor: 'end',
|
|
136
|
+
dominantBaseline: 'text-after-edge',
|
|
137
|
+
}),
|
|
138
|
+
[PlotbandLabelPosition.RightOutside]: ({ startX, width, height, offsetX }) => ({
|
|
139
|
+
x: startX + width + offsetX,
|
|
140
|
+
y: height / 2,
|
|
141
|
+
textAnchor: 'middle',
|
|
142
|
+
dominantBaseline: 'text-before-edge',
|
|
143
|
+
}),
|
|
144
|
+
[PlotbandLabelPosition.RightInside]: ({ startX, width, height, offsetX }) => ({
|
|
145
|
+
x: startX + width - offsetX,
|
|
146
|
+
y: height / 2,
|
|
147
|
+
textAnchor: 'middle',
|
|
148
|
+
dominantBaseline: 'text-after-edge',
|
|
149
|
+
}),
|
|
150
|
+
[PlotbandLabelPosition.BottomRightOutside]: ({ startX, width, height, offsetX, offsetY }) => ({
|
|
151
|
+
x: startX + width + offsetX,
|
|
152
|
+
y: height - offsetY,
|
|
153
|
+
textAnchor: 'start',
|
|
154
|
+
dominantBaseline: 'text-before-edge',
|
|
155
|
+
}),
|
|
156
|
+
[PlotbandLabelPosition.BottomRightInside]: ({ startX, width, height, offsetX, offsetY }) => ({
|
|
157
|
+
x: startX + width - offsetX,
|
|
158
|
+
y: height - offsetY,
|
|
159
|
+
textAnchor: 'start',
|
|
160
|
+
dominantBaseline: 'text-after-edge',
|
|
161
|
+
}),
|
|
162
|
+
[PlotbandLabelPosition.BottomOutside]: ({ startX, width, height, offsetY }) => ({
|
|
163
|
+
x: startX + width / 2,
|
|
164
|
+
y: height - offsetY,
|
|
165
|
+
textAnchor: 'start',
|
|
166
|
+
dominantBaseline: 'middle',
|
|
167
|
+
}),
|
|
168
|
+
[PlotbandLabelPosition.BottomInside]: ({ startX, width, height, offsetY }) => ({
|
|
169
|
+
x: startX + width / 2,
|
|
170
|
+
y: height - offsetY,
|
|
171
|
+
textAnchor: 'start',
|
|
172
|
+
dominantBaseline: 'middle',
|
|
173
|
+
}),
|
|
174
|
+
[PlotbandLabelPosition.BottomLeftOutside]: ({ startX, height, offsetX, offsetY }) => ({
|
|
175
|
+
x: startX - offsetX,
|
|
176
|
+
y: height - offsetY,
|
|
177
|
+
textAnchor: 'start',
|
|
178
|
+
dominantBaseline: 'text-after-edge',
|
|
179
|
+
}),
|
|
180
|
+
[PlotbandLabelPosition.BottomLeftInside]: ({ startX, height, offsetX, offsetY }) => ({
|
|
181
|
+
x: startX + offsetX,
|
|
182
|
+
y: height - offsetY,
|
|
183
|
+
textAnchor: 'start',
|
|
184
|
+
dominantBaseline: 'text-before-edge',
|
|
185
|
+
}),
|
|
186
|
+
[PlotbandLabelPosition.LeftOutside]: ({ startX, height, offsetX }) => ({
|
|
187
|
+
x: startX - offsetX,
|
|
188
|
+
y: height / 2,
|
|
189
|
+
textAnchor: 'middle',
|
|
190
|
+
dominantBaseline: 'text-after-edge',
|
|
191
|
+
}),
|
|
192
|
+
[PlotbandLabelPosition.LeftInside]: ({ startX, height, offsetX }) => ({
|
|
193
|
+
x: startX + offsetX,
|
|
194
|
+
y: height / 2,
|
|
195
|
+
textAnchor: 'middle',
|
|
196
|
+
dominantBaseline: 'text-before-edge',
|
|
197
|
+
}),
|
|
198
|
+
};
|
|
199
|
+
const HORIZONTAL_Y = {
|
|
200
|
+
[PlotbandLabelPosition.TopLeftOutside]: ({ startY, offsetX, offsetY }) => ({
|
|
201
|
+
x: offsetX,
|
|
202
|
+
y: startY - offsetY,
|
|
203
|
+
textAnchor: 'start',
|
|
204
|
+
dominantBaseline: 'text-after-edge',
|
|
205
|
+
}),
|
|
206
|
+
[PlotbandLabelPosition.TopLeftInside]: ({ startY, offsetX, offsetY }) => ({
|
|
207
|
+
x: offsetX,
|
|
208
|
+
y: startY + offsetY,
|
|
209
|
+
textAnchor: 'start',
|
|
210
|
+
dominantBaseline: 'text-before-edge',
|
|
211
|
+
}),
|
|
212
|
+
[PlotbandLabelPosition.TopOutside]: ({ startX, width, startY, offsetY }) => ({
|
|
213
|
+
x: startX + width / 2,
|
|
214
|
+
y: startY - offsetY,
|
|
215
|
+
textAnchor: 'middle',
|
|
216
|
+
dominantBaseline: 'text-after-edge',
|
|
217
|
+
}),
|
|
218
|
+
[PlotbandLabelPosition.TopInside]: ({ startX, width, startY, offsetY }) => ({
|
|
219
|
+
x: startX + width / 2,
|
|
220
|
+
y: startY + offsetY,
|
|
221
|
+
textAnchor: 'middle',
|
|
222
|
+
dominantBaseline: 'text-before-edge',
|
|
223
|
+
}),
|
|
224
|
+
[PlotbandLabelPosition.TopRightOutside]: ({ startY, width, offsetX, offsetY }) => ({
|
|
225
|
+
x: width - offsetX,
|
|
226
|
+
y: startY - offsetY,
|
|
227
|
+
textAnchor: 'end',
|
|
228
|
+
dominantBaseline: 'text-after-edge',
|
|
229
|
+
}),
|
|
230
|
+
[PlotbandLabelPosition.TopRightInside]: ({ startY, width, offsetX, offsetY }) => ({
|
|
231
|
+
x: width - offsetX,
|
|
232
|
+
y: startY + offsetY,
|
|
233
|
+
textAnchor: 'end',
|
|
234
|
+
dominantBaseline: 'text-before-edge',
|
|
235
|
+
}),
|
|
236
|
+
[PlotbandLabelPosition.RightOutside]: ({ startY, height, width, offsetX }) => ({
|
|
237
|
+
x: width - offsetX,
|
|
238
|
+
y: startY + height / 2,
|
|
239
|
+
textAnchor: 'end',
|
|
240
|
+
dominantBaseline: 'middle',
|
|
241
|
+
}),
|
|
242
|
+
[PlotbandLabelPosition.RightInside]: ({ startY, height, width, offsetX }) => ({
|
|
243
|
+
x: width - offsetX,
|
|
244
|
+
y: startY + height / 2,
|
|
245
|
+
textAnchor: 'end',
|
|
246
|
+
dominantBaseline: 'middle',
|
|
247
|
+
}),
|
|
248
|
+
[PlotbandLabelPosition.BottomRightOutside]: ({ startY, height, width, offsetX, offsetY }) => ({
|
|
249
|
+
x: width - offsetX,
|
|
250
|
+
y: startY + height + offsetY,
|
|
251
|
+
textAnchor: 'end',
|
|
252
|
+
dominantBaseline: 'text-before-edge',
|
|
253
|
+
}),
|
|
254
|
+
[PlotbandLabelPosition.BottomRightInside]: ({ startY, height, width, offsetX, offsetY }) => ({
|
|
255
|
+
x: width - offsetX,
|
|
256
|
+
y: startY + height - offsetY,
|
|
257
|
+
textAnchor: 'end',
|
|
258
|
+
dominantBaseline: 'text-after-edge',
|
|
259
|
+
}),
|
|
260
|
+
[PlotbandLabelPosition.BottomOutside]: ({ startX, width, startY, height, offsetY }) => ({
|
|
261
|
+
x: startX + width / 2,
|
|
262
|
+
y: startY + height + offsetY,
|
|
263
|
+
textAnchor: 'middle',
|
|
264
|
+
dominantBaseline: 'text-before-edge',
|
|
265
|
+
}),
|
|
266
|
+
[PlotbandLabelPosition.BottomInside]: ({ startX, width, startY, height, offsetY }) => ({
|
|
267
|
+
x: startX + width / 2,
|
|
268
|
+
y: startY + height - offsetY,
|
|
269
|
+
textAnchor: 'middle',
|
|
270
|
+
dominantBaseline: 'text-after-edge',
|
|
271
|
+
}),
|
|
272
|
+
[PlotbandLabelPosition.BottomLeftOutside]: ({ startY, height, offsetX, offsetY }) => ({
|
|
273
|
+
x: offsetX,
|
|
274
|
+
y: startY + height + offsetY,
|
|
275
|
+
textAnchor: 'start',
|
|
276
|
+
dominantBaseline: 'text-before-edge',
|
|
277
|
+
}),
|
|
278
|
+
[PlotbandLabelPosition.BottomLeftInside]: ({ startY, height, offsetX, offsetY }) => ({
|
|
279
|
+
x: offsetX,
|
|
280
|
+
y: startY + height - offsetY,
|
|
281
|
+
textAnchor: 'start',
|
|
282
|
+
dominantBaseline: 'text-after-edge',
|
|
283
|
+
}),
|
|
284
|
+
[PlotbandLabelPosition.LeftOutside]: ({ startY, height, offsetX }) => ({
|
|
285
|
+
x: offsetX,
|
|
286
|
+
y: startY + height / 2,
|
|
287
|
+
textAnchor: 'start',
|
|
288
|
+
dominantBaseline: 'middle',
|
|
289
|
+
}),
|
|
290
|
+
[PlotbandLabelPosition.LeftInside]: ({ startY, height, offsetX }) => ({
|
|
291
|
+
x: offsetX,
|
|
292
|
+
y: startY + height / 2,
|
|
293
|
+
textAnchor: 'start',
|
|
294
|
+
dominantBaseline: 'middle',
|
|
295
|
+
}),
|
|
296
|
+
};
|
|
297
|
+
const VERTICAL_Y = {
|
|
298
|
+
[PlotbandLabelPosition.TopLeftOutside]: ({ startY, offsetX, offsetY }) => ({
|
|
299
|
+
x: offsetX,
|
|
300
|
+
y: startY - offsetY,
|
|
301
|
+
textAnchor: 'start',
|
|
302
|
+
dominantBaseline: 'text-after-edge',
|
|
303
|
+
rotation: -90,
|
|
304
|
+
}),
|
|
305
|
+
[PlotbandLabelPosition.TopLeftInside]: ({ startY, offsetX, offsetY }) => ({
|
|
306
|
+
x: offsetX,
|
|
307
|
+
y: startY + offsetY,
|
|
308
|
+
textAnchor: 'end',
|
|
309
|
+
dominantBaseline: 'text-before-edge',
|
|
310
|
+
rotation: -90,
|
|
311
|
+
}),
|
|
312
|
+
[PlotbandLabelPosition.TopOutside]: ({ startX, width, startY, offsetY }) => ({
|
|
313
|
+
x: startX + width / 2,
|
|
314
|
+
y: startY - offsetY,
|
|
315
|
+
textAnchor: 'end',
|
|
316
|
+
dominantBaseline: 'middle',
|
|
317
|
+
rotation: -90,
|
|
318
|
+
}),
|
|
319
|
+
[PlotbandLabelPosition.TopInside]: ({ startX, width, startY, offsetY }) => ({
|
|
320
|
+
x: startX + width / 2,
|
|
321
|
+
y: startY + offsetY,
|
|
322
|
+
textAnchor: 'end',
|
|
323
|
+
dominantBaseline: 'middle',
|
|
324
|
+
rotation: -90,
|
|
325
|
+
}),
|
|
326
|
+
[PlotbandLabelPosition.TopRightOutside]: ({ startY, width, offsetX, offsetY }) => ({
|
|
327
|
+
x: width - offsetX,
|
|
328
|
+
y: startY - offsetY,
|
|
329
|
+
textAnchor: 'start',
|
|
330
|
+
dominantBaseline: 'text-after-edge',
|
|
331
|
+
rotation: -90,
|
|
332
|
+
}),
|
|
333
|
+
[PlotbandLabelPosition.TopRightInside]: ({ startY, width, offsetX, offsetY }) => ({
|
|
334
|
+
x: width - offsetX,
|
|
335
|
+
y: startY + offsetY,
|
|
336
|
+
textAnchor: 'end',
|
|
337
|
+
dominantBaseline: 'text-after-edge',
|
|
338
|
+
rotation: -90,
|
|
339
|
+
}),
|
|
340
|
+
[PlotbandLabelPosition.RightOutside]: ({ startY, height, width, offsetX }) => ({
|
|
341
|
+
x: width - offsetX,
|
|
342
|
+
y: startY + height / 2,
|
|
343
|
+
textAnchor: 'middle',
|
|
344
|
+
dominantBaseline: 'text-after-edge',
|
|
345
|
+
rotation: -90,
|
|
346
|
+
}),
|
|
347
|
+
[PlotbandLabelPosition.RightInside]: ({ startY, height, width, offsetX }) => ({
|
|
348
|
+
x: width - offsetX,
|
|
349
|
+
y: startY + height / 2,
|
|
350
|
+
textAnchor: 'middle',
|
|
351
|
+
dominantBaseline: 'text-after-edge',
|
|
352
|
+
rotation: -90,
|
|
353
|
+
}),
|
|
354
|
+
[PlotbandLabelPosition.BottomRightOutside]: ({ startY, height, width, offsetX, offsetY }) => ({
|
|
355
|
+
x: width - offsetX,
|
|
356
|
+
y: startY + height + offsetY,
|
|
357
|
+
textAnchor: 'start',
|
|
358
|
+
dominantBaseline: 'text-before-edge',
|
|
359
|
+
rotation: -90,
|
|
360
|
+
}),
|
|
361
|
+
[PlotbandLabelPosition.BottomRightInside]: ({ startY, height, width, offsetX, offsetY }) => ({
|
|
362
|
+
x: width - offsetX,
|
|
363
|
+
y: startY + height - offsetY,
|
|
364
|
+
textAnchor: 'start',
|
|
365
|
+
dominantBaseline: 'text-after-edge',
|
|
366
|
+
rotation: -90,
|
|
367
|
+
}),
|
|
368
|
+
[PlotbandLabelPosition.BottomOutside]: ({ startX, width, startY, height, offsetY }) => ({
|
|
369
|
+
x: startX + width / 2,
|
|
370
|
+
y: startY + height + offsetY,
|
|
371
|
+
textAnchor: 'start',
|
|
372
|
+
dominantBaseline: 'middle',
|
|
373
|
+
rotation: -90,
|
|
374
|
+
}),
|
|
375
|
+
[PlotbandLabelPosition.BottomInside]: ({ startX, width, startY, height, offsetY }) => ({
|
|
376
|
+
x: startX + width / 2,
|
|
377
|
+
y: startY + height - offsetY,
|
|
378
|
+
textAnchor: 'start',
|
|
379
|
+
dominantBaseline: 'middle',
|
|
380
|
+
rotation: -90,
|
|
381
|
+
}),
|
|
382
|
+
[PlotbandLabelPosition.BottomLeftOutside]: ({ startY, height, offsetX, offsetY }) => ({
|
|
383
|
+
x: offsetX,
|
|
384
|
+
y: startY + height + offsetY,
|
|
385
|
+
textAnchor: 'end',
|
|
386
|
+
dominantBaseline: 'text-before-edge',
|
|
387
|
+
rotation: -90,
|
|
388
|
+
}),
|
|
389
|
+
[PlotbandLabelPosition.BottomLeftInside]: ({ startY, height, offsetX, offsetY }) => ({
|
|
390
|
+
x: offsetX,
|
|
391
|
+
y: startY + height - offsetY,
|
|
392
|
+
textAnchor: 'start',
|
|
393
|
+
dominantBaseline: 'text-before-edge',
|
|
394
|
+
rotation: -90,
|
|
395
|
+
}),
|
|
396
|
+
[PlotbandLabelPosition.LeftOutside]: ({ startY, height, offsetX }) => ({
|
|
397
|
+
x: offsetX,
|
|
398
|
+
y: startY + height / 2,
|
|
399
|
+
textAnchor: 'middle',
|
|
400
|
+
dominantBaseline: 'text-before-edge',
|
|
401
|
+
rotation: -90,
|
|
402
|
+
}),
|
|
403
|
+
[PlotbandLabelPosition.LeftInside]: ({ startY, height, offsetX }) => ({
|
|
404
|
+
x: offsetX,
|
|
405
|
+
y: startY + height / 2,
|
|
406
|
+
textAnchor: 'middle',
|
|
407
|
+
dominantBaseline: 'text-before-edge',
|
|
408
|
+
rotation: -90,
|
|
409
|
+
}),
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
export { HORIZONTAL_X, HORIZONTAL_Y, VERTICAL_X, VERTICAL_Y };
|
|
413
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../src/components/plotband/constants.ts"],"sourcesContent":["import { PlotbandLayoutMap, PlotbandLabelPosition } from './types'\n\nexport const HORIZONTAL_X: PlotbandLayoutMap = {\n [PlotbandLabelPosition.TopLeftOutside]: ({ startX, offsetX, offsetY }) => ({\n x: startX - offsetX,\n y: offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopLeftInside]: ({ startX, offsetX, offsetY }) => ({\n x: startX + offsetX,\n y: offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopOutside]: ({ startX, width, offsetY }) => ({\n x: startX + width / 2,\n y: offsetY,\n textAnchor: 'middle',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopInside]: ({ startX, width, offsetY }) => ({\n x: startX + width / 2,\n y: offsetY,\n textAnchor: 'middle',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopRightOutside]: ({ startX, width, offsetX, offsetY }) => ({\n x: startX + width + offsetX,\n y: offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopRightInside]: ({ startX, width, offsetX, offsetY }) => ({\n x: startX + width - offsetX,\n y: offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.RightOutside]: ({ startX, width, height, offsetX }) => ({\n x: startX + width + offsetX,\n y: height / 2,\n textAnchor: 'start',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.RightInside]: ({ startX, width, height, offsetX }) => ({\n x: startX + width - offsetX,\n y: height / 2,\n textAnchor: 'end',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.BottomRightOutside]: ({ startX, width, height, offsetX, offsetY }) => ({\n x: startX + width + offsetX,\n y: height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomRightInside]: ({ startX, width, height, offsetX, offsetY }) => ({\n x: startX + width - offsetX,\n y: height - offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomOutside]: ({ startX, width, height, offsetY }) => ({\n x: startX + width / 2,\n y: height - offsetY,\n textAnchor: 'middle',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomInside]: ({ startX, width, height, offsetY }) => ({\n x: startX + width / 2,\n y: height - offsetY,\n textAnchor: 'middle',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomLeftOutside]: ({ startX, height, offsetX, offsetY }) => ({\n x: startX - offsetX,\n y: height - offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomLeftInside]: ({ startX, height, offsetX, offsetY }) => ({\n x: startX + offsetX,\n y: height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.LeftOutside]: ({ startX, height, offsetX }) => ({\n x: startX - offsetX,\n y: height / 2,\n textAnchor: 'end',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.LeftInside]: ({ startX, height, offsetX }) => ({\n x: startX + offsetX,\n y: height / 2,\n textAnchor: 'start',\n dominantBaseline: 'middle',\n }),\n}\n\nexport const VERTICAL_X: PlotbandLayoutMap = {\n [PlotbandLabelPosition.TopLeftOutside]: ({ startX, offsetX, offsetY }) => ({\n x: startX - offsetX,\n y: offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.TopLeftInside]: ({ startX, offsetX, offsetY }) => ({\n x: startX + offsetX,\n y: offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopOutside]: ({ startX, width, offsetY }) => ({\n x: startX + width / 2,\n y: offsetY,\n textAnchor: 'end',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.TopInside]: ({ startX, width, offsetY }) => ({\n x: startX + width / 2,\n y: offsetY,\n textAnchor: 'end',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.TopRightOutside]: ({ startX, width, offsetX, offsetY }) => ({\n x: startX + width + offsetX,\n y: offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopRightInside]: ({ startX, width, offsetX, offsetY }) => ({\n x: startX + width - offsetX,\n y: offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.RightOutside]: ({ startX, width, height, offsetX }) => ({\n x: startX + width + offsetX,\n y: height / 2,\n textAnchor: 'middle',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.RightInside]: ({ startX, width, height, offsetX }) => ({\n x: startX + width - offsetX,\n y: height / 2,\n textAnchor: 'middle',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomRightOutside]: ({ startX, width, height, offsetX, offsetY }) => ({\n x: startX + width + offsetX,\n y: height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.BottomRightInside]: ({ startX, width, height, offsetX, offsetY }) => ({\n x: startX + width - offsetX,\n y: height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomOutside]: ({ startX, width, height, offsetY }) => ({\n x: startX + width / 2,\n y: height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.BottomInside]: ({ startX, width, height, offsetY }) => ({\n x: startX + width / 2,\n y: height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.BottomLeftOutside]: ({ startX, height, offsetX, offsetY }) => ({\n x: startX - offsetX,\n y: height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomLeftInside]: ({ startX, height, offsetX, offsetY }) => ({\n x: startX + offsetX,\n y: height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.LeftOutside]: ({ startX, height, offsetX }) => ({\n x: startX - offsetX,\n y: height / 2,\n textAnchor: 'middle',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.LeftInside]: ({ startX, height, offsetX }) => ({\n x: startX + offsetX,\n y: height / 2,\n textAnchor: 'middle',\n dominantBaseline: 'text-before-edge',\n }),\n}\n\nexport const HORIZONTAL_Y: PlotbandLayoutMap = {\n [PlotbandLabelPosition.TopLeftOutside]: ({ startY, offsetX, offsetY }) => ({\n x: offsetX,\n y: startY - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.TopLeftInside]: ({ startY, offsetX, offsetY }) => ({\n x: offsetX,\n y: startY + offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopOutside]: ({ startX, width, startY, offsetY }) => ({\n x: startX + width / 2,\n y: startY - offsetY,\n textAnchor: 'middle',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.TopInside]: ({ startX, width, startY, offsetY }) => ({\n x: startX + width / 2,\n y: startY + offsetY,\n textAnchor: 'middle',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.TopRightOutside]: ({ startY, width, offsetX, offsetY }) => ({\n x: width - offsetX,\n y: startY - offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.TopRightInside]: ({ startY, width, offsetX, offsetY }) => ({\n x: width - offsetX,\n y: startY + offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.RightOutside]: ({ startY, height, width, offsetX }) => ({\n x: width - offsetX,\n y: startY + height / 2,\n textAnchor: 'end',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.RightInside]: ({ startY, height, width, offsetX }) => ({\n x: width - offsetX,\n y: startY + height / 2,\n textAnchor: 'end',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.BottomRightOutside]: ({ startY, height, width, offsetX, offsetY }) => ({\n x: width - offsetX,\n y: startY + height + offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.BottomRightInside]: ({ startY, height, width, offsetX, offsetY }) => ({\n x: width - offsetX,\n y: startY + height - offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomOutside]: ({ startX, width, startY, height, offsetY }) => ({\n x: startX + width / 2,\n y: startY + height + offsetY,\n textAnchor: 'middle',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.BottomInside]: ({ startX, width, startY, height, offsetY }) => ({\n x: startX + width / 2,\n y: startY + height - offsetY,\n textAnchor: 'middle',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.BottomLeftOutside]: ({ startY, height, offsetX, offsetY }) => ({\n x: offsetX,\n y: startY + height + offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-before-edge',\n }),\n [PlotbandLabelPosition.BottomLeftInside]: ({ startY, height, offsetX, offsetY }) => ({\n x: offsetX,\n y: startY + height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n }),\n [PlotbandLabelPosition.LeftOutside]: ({ startY, height, offsetX }) => ({\n x: offsetX,\n y: startY + height / 2,\n textAnchor: 'start',\n dominantBaseline: 'middle',\n }),\n [PlotbandLabelPosition.LeftInside]: ({ startY, height, offsetX }) => ({\n x: offsetX,\n y: startY + height / 2,\n textAnchor: 'start',\n dominantBaseline: 'middle',\n }),\n}\n\nexport const VERTICAL_Y: PlotbandLayoutMap = {\n [PlotbandLabelPosition.TopLeftOutside]: ({ startY, offsetX, offsetY }) => ({\n x: offsetX,\n y: startY - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.TopLeftInside]: ({ startY, offsetX, offsetY }) => ({\n x: offsetX,\n y: startY + offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-before-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.TopOutside]: ({ startX, width, startY, offsetY }) => ({\n x: startX + width / 2,\n y: startY - offsetY,\n textAnchor: 'end',\n dominantBaseline: 'middle',\n rotation: -90,\n }),\n [PlotbandLabelPosition.TopInside]: ({ startX, width, startY, offsetY }) => ({\n x: startX + width / 2,\n y: startY + offsetY,\n textAnchor: 'end',\n dominantBaseline: 'middle',\n rotation: -90,\n }),\n [PlotbandLabelPosition.TopRightOutside]: ({ startY, width, offsetX, offsetY }) => ({\n x: width - offsetX,\n y: startY - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.TopRightInside]: ({ startY, width, offsetX, offsetY }) => ({\n x: width - offsetX,\n y: startY + offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-after-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.RightOutside]: ({ startY, height, width, offsetX }) => ({\n x: width - offsetX,\n y: startY + height / 2,\n textAnchor: 'middle',\n dominantBaseline: 'text-after-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.RightInside]: ({ startY, height, width, offsetX }) => ({\n x: width - offsetX,\n y: startY + height / 2,\n textAnchor: 'middle',\n dominantBaseline: 'text-after-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.BottomRightOutside]: ({ startY, height, width, offsetX, offsetY }) => ({\n x: width - offsetX,\n y: startY + height + offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-before-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.BottomRightInside]: ({ startY, height, width, offsetX, offsetY }) => ({\n x: width - offsetX,\n y: startY + height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-after-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.BottomOutside]: ({ startX, width, startY, height, offsetY }) => ({\n x: startX + width / 2,\n y: startY + height + offsetY,\n textAnchor: 'start',\n dominantBaseline: 'middle',\n rotation: -90,\n }),\n [PlotbandLabelPosition.BottomInside]: ({ startX, width, startY, height, offsetY }) => ({\n x: startX + width / 2,\n y: startY + height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'middle',\n rotation: -90,\n }),\n [PlotbandLabelPosition.BottomLeftOutside]: ({ startY, height, offsetX, offsetY }) => ({\n x: offsetX,\n y: startY + height + offsetY,\n textAnchor: 'end',\n dominantBaseline: 'text-before-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.BottomLeftInside]: ({ startY, height, offsetX, offsetY }) => ({\n x: offsetX,\n y: startY + height - offsetY,\n textAnchor: 'start',\n dominantBaseline: 'text-before-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.LeftOutside]: ({ startY, height, offsetX }) => ({\n x: offsetX,\n y: startY + height / 2,\n textAnchor: 'middle',\n dominantBaseline: 'text-before-edge',\n rotation: -90,\n }),\n [PlotbandLabelPosition.LeftInside]: ({ startY, height, offsetX }) => ({\n x: offsetX,\n y: startY + height / 2,\n textAnchor: 'middle',\n dominantBaseline: 'text-before-edge',\n rotation: -90,\n }),\n}\n"],"names":[],"mappings":";;AAEa,MAAA,YAAY,GAAsB;AAC7C,IAAA,CAAC,qBAAqB,CAAC,cAAc,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;QACzE,CAAC,EAAE,MAAM,GAAG,OAAO;AACnB,QAAA,CAAC,EAAE,OAAO;AACV,QAAA,UAAU,EAAE,KAAK;AACjB,QAAA,gBAAgB,EAAE,kBAAkB;KACrC,CAAC;AACF,IAAA,CAAC,qBAAqB,CAAC,aAAa,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;QACxE,CAAC,EAAE,MAAM,GAAG,OAAO;AACnB,QAAA,CAAC,EAAE,OAAO;AACV,QAAA,UAAU,EAAE,OAAO;AACnB,QAAA,gBAAgB,EAAE,kBAAkB;KACrC,CAAC;AACF,IAAA,CAAC,qBAAqB,CAAC,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACnE,QAAA,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,CAAC;AACrB,QAAA,CAAC,EAAE,OAAO;AACV,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,gBAAgB,EAAE,kBAAkB;KACrC,CAAC;AACF,IAAA,CAAC,qBAAqB,CAAC,SAAS,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AAClE,QAAA,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,CAAC;AACrB,QAAA,CAAC,EAA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G,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;AACnF,QAAA,CAAC,EAAE,OAAO;AACV,QAAA,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;AAC5B,QAAA,UAAU,EAAE,OAAO;AACnB,QAAA,gBAAgB,EAAE,kBAAkB;QACpC,QAAQ,EAAE,CAAC,EAAE;KACd,CAAC;AACF,IAAA,CAAC,qBAAqB,CAAC,WAAW,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;AACrE,QAAA,CAAC,EAAE,OAAO;AACV,QAAA,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC;AACtB,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,gBAAgB,EAAE,kBAAkB;QACpC,QAAQ,EAAE,CAAC,EAAE;KACd,CAAC;AACF,IAAA,CAAC,qBAAqB,CAAC,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;AACpE,QAAA,CAAC,EAAE,OAAO;AACV,QAAA,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC;AACtB,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,gBAAgB,EAAE,kBAAkB;QACpC,QAAQ,EAAE,CAAC,EAAE;KACd,CAAC;;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Selection } from 'd3-selection';
|
|
2
|
+
import { XYComponentCore } from "../../core/xy-component";
|
|
3
|
+
import { PlotbandConfigInterface } from './config';
|
|
4
|
+
import * as s from './style';
|
|
5
|
+
export declare class Plotband<Datum> extends XYComponentCore<Datum, PlotbandConfigInterface<Datum>> {
|
|
6
|
+
static selectors: typeof s;
|
|
7
|
+
protected _defaultConfig: PlotbandConfigInterface<Datum>;
|
|
8
|
+
from: number | null | undefined;
|
|
9
|
+
to: number | null | undefined;
|
|
10
|
+
plotband: Selection<SVGRectElement, unknown, null, undefined>;
|
|
11
|
+
label: Selection<SVGTextElement, unknown, null, undefined>;
|
|
12
|
+
constructor(config: PlotbandConfigInterface<Datum>);
|
|
13
|
+
_render(customDuration?: number): void;
|
|
14
|
+
private computeLabel;
|
|
15
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { smartTransition } from '../../utils/d3.js';
|
|
2
|
+
import { XYComponentCore } from '../../core/xy-component/index.js';
|
|
3
|
+
import { AxisType } from '../axis/types.js';
|
|
4
|
+
import { VERTICAL_X, HORIZONTAL_X, VERTICAL_Y, HORIZONTAL_Y } from './constants.js';
|
|
5
|
+
import { PlotbandDefaultConfig } from './config.js';
|
|
6
|
+
import * as style from './style.js';
|
|
7
|
+
import { plotband, label } from './style.js';
|
|
8
|
+
|
|
9
|
+
// Utils
|
|
10
|
+
class Plotband extends XYComponentCore {
|
|
11
|
+
constructor(config) {
|
|
12
|
+
super();
|
|
13
|
+
this._defaultConfig = PlotbandDefaultConfig;
|
|
14
|
+
if (config)
|
|
15
|
+
this.setConfig(config);
|
|
16
|
+
this.plotband = this.g.append('rect')
|
|
17
|
+
.attr('class', plotband);
|
|
18
|
+
this.label = this.g
|
|
19
|
+
.append('text')
|
|
20
|
+
.attr('class', label);
|
|
21
|
+
}
|
|
22
|
+
_render(customDuration) {
|
|
23
|
+
super._render(customDuration);
|
|
24
|
+
const { config } = this;
|
|
25
|
+
this.from = config.from;
|
|
26
|
+
this.to = config.to;
|
|
27
|
+
this.plotband
|
|
28
|
+
.style('fill', config.color);
|
|
29
|
+
if (this.from == null || this.to == null)
|
|
30
|
+
return;
|
|
31
|
+
let x = 0;
|
|
32
|
+
let y = 0;
|
|
33
|
+
let width = 0;
|
|
34
|
+
let height = 0;
|
|
35
|
+
if (config.axis === 'y') {
|
|
36
|
+
const y1 = this.yScale(this.from);
|
|
37
|
+
const y2 = this.yScale(this.to);
|
|
38
|
+
y = Math.min(y1, y2);
|
|
39
|
+
height = Math.abs(y1 - y2);
|
|
40
|
+
x = 0;
|
|
41
|
+
width = this._width;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const x1 = this.xScale(this.from);
|
|
45
|
+
const x2 = this.xScale(this.to);
|
|
46
|
+
x = Math.min(x1, x2);
|
|
47
|
+
width = Math.abs(x1 - x2);
|
|
48
|
+
y = 0;
|
|
49
|
+
height = this._height;
|
|
50
|
+
}
|
|
51
|
+
smartTransition(this.plotband, config.duration)
|
|
52
|
+
.attr('x', x)
|
|
53
|
+
.attr('y', y)
|
|
54
|
+
.attr('width', width)
|
|
55
|
+
.attr('height', height);
|
|
56
|
+
if (config.labelText) {
|
|
57
|
+
const labelProps = this.computeLabel(config.axis, x, y, width, height, config.labelPosition, config.labelOffsetX, config.labelOffsetY, config.labelOrientation);
|
|
58
|
+
this.label
|
|
59
|
+
.attr('dominant-baseline', labelProps.dominantBaseline)
|
|
60
|
+
.attr('transform', labelProps.transform)
|
|
61
|
+
.style('text-anchor', labelProps.textAnchor)
|
|
62
|
+
.style('fill', config.labelColor)
|
|
63
|
+
.style('font-size', config.labelSize ? `${config.labelSize}px` : undefined);
|
|
64
|
+
smartTransition(this.label, config.duration)
|
|
65
|
+
.text(config.labelText)
|
|
66
|
+
.attr('x', labelProps.x)
|
|
67
|
+
.attr('y', labelProps.y);
|
|
68
|
+
}
|
|
69
|
+
smartTransition(this.plotband.exit())
|
|
70
|
+
.style('opacity', 0)
|
|
71
|
+
.remove();
|
|
72
|
+
}
|
|
73
|
+
computeLabel(axis, startX, startY, width, height, position, offsetX, offsetY, orientation) {
|
|
74
|
+
const isVertical = orientation === 'vertical';
|
|
75
|
+
const rotation = isVertical ? -90 : 0;
|
|
76
|
+
const args = { startX, startY, width, height, offsetX, offsetY };
|
|
77
|
+
let layoutPartial;
|
|
78
|
+
if (axis === AxisType.X) {
|
|
79
|
+
layoutPartial = (isVertical ? VERTICAL_X : HORIZONTAL_X)[position](args);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
layoutPartial = (isVertical ? VERTICAL_Y : HORIZONTAL_Y)[position](args);
|
|
83
|
+
}
|
|
84
|
+
const { x, y, textAnchor, dominantBaseline } = layoutPartial;
|
|
85
|
+
const transform = rotation !== 0 ? `rotate(${rotation}, ${x}, ${y})` : '';
|
|
86
|
+
return { x, y, rotation, textAnchor, transform, dominantBaseline };
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
Plotband.selectors = style;
|
|
90
|
+
|
|
91
|
+
export { Plotband };
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/plotband/index.ts"],"sourcesContent":["import { Selection } from 'd3-selection'\n\n// Utils\nimport { smartTransition } from 'utils/d3'\n\n// Core\nimport { XYComponentCore } from 'core/xy-component'\nimport { AxisType } from 'components/axis/types'\n\n// Config\nimport { VERTICAL_X, HORIZONTAL_X, VERTICAL_Y, HORIZONTAL_Y } from './constants'\nimport { PlotbandDefaultConfig, PlotbandConfigInterface } from './config'\nimport { PlotbandLabelOrientation, PlotbandLabelPosition, PlotbandLabelLayout } from './types'\n\n// Styles\nimport * as s from './style'\n\nexport class Plotband<Datum> extends XYComponentCore<Datum, PlotbandConfigInterface<Datum>> {\n static selectors = s\n protected _defaultConfig = PlotbandDefaultConfig as PlotbandConfigInterface<Datum>\n from: number | null | undefined\n to: number | null | undefined\n plotband: Selection<SVGRectElement, unknown, null, undefined>\n label: Selection<SVGTextElement, unknown, null, undefined>\n\n constructor (config: PlotbandConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n\n this.plotband = this.g.append('rect')\n .attr('class', s.plotband)\n\n this.label = this.g\n .append('text')\n .attr('class', s.label)\n }\n\n _render (customDuration?: number): void {\n super._render(customDuration)\n const { config } = this\n this.from = config.from\n this.to = config.to\n\n this.plotband\n .style('fill', config.color)\n\n if (this.from == null || this.to == null) return\n\n let x = 0\n let y = 0\n let width = 0\n let height = 0\n\n if (config.axis === 'y') {\n const y1 = this.yScale(this.from)\n const y2 = this.yScale(this.to)\n y = Math.min(y1, y2)\n height = Math.abs(y1 - y2)\n x = 0\n width = this._width\n } else {\n const x1 = this.xScale(this.from)\n const x2 = this.xScale(this.to)\n x = Math.min(x1, x2)\n width = Math.abs(x1 - x2)\n y = 0\n height = this._height\n }\n\n smartTransition(this.plotband, config.duration)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n\n if (config.labelText) {\n const labelProps = this.computeLabel(\n config.axis,\n x,\n y,\n width,\n height,\n config.labelPosition,\n config.labelOffsetX,\n config.labelOffsetY,\n config.labelOrientation\n )\n\n this.label\n .attr('dominant-baseline', labelProps.dominantBaseline)\n .attr('transform', labelProps.transform)\n .style('text-anchor', labelProps.textAnchor)\n .style('fill', config.labelColor)\n .style('font-size', config.labelSize ? `${config.labelSize}px` : undefined)\n\n smartTransition(this.label, config.duration)\n .text(config.labelText)\n .attr('x', labelProps.x)\n .attr('y', labelProps.y)\n }\n\n smartTransition(this.plotband.exit())\n .style('opacity', 0)\n .remove()\n }\n\n private computeLabel (\n axis: AxisType,\n startX: number,\n startY: number,\n width: number,\n height: number,\n position: PlotbandLabelPosition,\n offsetX: number,\n offsetY: number,\n orientation: PlotbandLabelOrientation\n ): PlotbandLabelLayout {\n const isVertical = orientation === 'vertical'\n const rotation = isVertical ? -90 : 0\n const args = { startX, startY, width, height, offsetX, offsetY }\n\n let layoutPartial: Omit<PlotbandLabelLayout, 'rotation' | 'transform'>\n\n if (axis === AxisType.X) {\n layoutPartial = (isVertical ? VERTICAL_X : HORIZONTAL_X)[position](args)\n } else {\n layoutPartial = (isVertical ? VERTICAL_Y : HORIZONTAL_Y)[position](args)\n }\n\n const { x, y, textAnchor, dominantBaseline } = layoutPartial\n const transform = rotation !== 0 ? `rotate(${rotation}, ${x}, ${y})` : ''\n\n return { x, y, rotation, textAnchor, transform, dominantBaseline }\n }\n}\n"],"names":["s.plotband","s.label","s"],"mappings":";;;;;;;;AAEA;AAeM,MA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CAAA;AAEtE,QAAA,IAAI,IAAI,KAAK,QAAQ,CAAC,CAAC,EAAE;AACvB,YAAA,aAAa,GAAG,CAAC,UAAU,GAAG,UAAU,GAAG,YAAY,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAA;AACzE,SAAA;AAAM,aAAA;AACL,YAAA,aAAa,GAAG,CAAC,UAAU,GAAG,UAAU,GAAG,YAAY,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAA;AACzE,SAAA;QAED,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,aAAa,CAAA;AAC5D,QAAA,MAAM,SAAS,GAAG,QAAQ,KAAK,CAAC,GAAG,CAAA,OAAA,EAAU,QAAQ,CAAK,EAAA,EAAA,CAAC,KAAK,CAAC,CAAA,CAAA,CAAG,GAAG,EAAE,CAAA;AAEzE,QAAA,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;KACnE;;AAnHM,QAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { injectGlobal, css } from '@emotion/css';
|
|
2
|
+
|
|
3
|
+
const globalStyles = injectGlobal `
|
|
4
|
+
:root {
|
|
5
|
+
--vis-plotband-color: rgba(255, 255, 90, 0.2);
|
|
6
|
+
--vis-plotband-label-font-size: 12px;
|
|
7
|
+
--vis-plotband-label-color: #000;
|
|
8
|
+
|
|
9
|
+
--vis-dark-plotband-color: rgba(220, 220, 90, 0.2);
|
|
10
|
+
--vis-dark-plotband-label-color: #e5e9f7;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
body.theme-dark {
|
|
14
|
+
--vis-plotband-color: var(--vis-dark-plotband-color);
|
|
15
|
+
--vis-plotband-label-color: var(--vis-dark-tooltip-text-color);
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
const root = css `
|
|
19
|
+
label: plotband-component;
|
|
20
|
+
`;
|
|
21
|
+
const plotband = css `
|
|
22
|
+
label: plotband-area;
|
|
23
|
+
transition: opacity 200ms;
|
|
24
|
+
cursor: var(--vis-line-cursor);
|
|
25
|
+
fill: var(--vis-plotband-color);
|
|
26
|
+
`;
|
|
27
|
+
const label = css `
|
|
28
|
+
label: plotline-label;
|
|
29
|
+
|
|
30
|
+
user-select: none;
|
|
31
|
+
text-anchor: middle;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
font-size: var(--vis-plotband-label-font-size);
|
|
34
|
+
fill: var(--vis-plotband-label-color);
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
export { globalStyles, label, plotband, root };
|
|
38
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../src/components/plotband/style.ts"],"sourcesContent":["import { css, injectGlobal } from '@emotion/css'\n\n\nexport const globalStyles = injectGlobal`\n :root {\n --vis-plotband-color: rgba(255, 255, 90, 0.2);\n --vis-plotband-label-font-size: 12px;\n --vis-plotband-label-color: #000;\n\n --vis-dark-plotband-color: rgba(220, 220, 90, 0.2);\n --vis-dark-plotband-label-color: #e5e9f7;\n }\n\n body.theme-dark {\n --vis-plotband-color: var(--vis-dark-plotband-color);\n --vis-plotband-label-color: var(--vis-dark-tooltip-text-color);\n }\n`\n\nexport const root = css`\n label: plotband-component;\n`\n\nexport const plotband = css`\n label: plotband-area;\n transition: opacity 200ms;\n cursor: var(--vis-line-cursor);\n fill: var(--vis-plotband-color);\n`\n\nexport const label = css`\n label: plotline-label;\n\n user-select: none;\n text-anchor: middle;\n pointer-events: none;\n font-size: var(--vis-plotband-label-font-size);\n fill: var(--vis-plotband-label-color);\n`\n"],"names":[],"mappings":";;AAGO,MAAM,YAAY,GAAG,YAAY,CAAA,CAAA;;;;;;;;;;;;;;EAcvC;AAEM,MAAM,IAAI,GAAG,GAAG,CAAA,CAAA;;EAEtB;AAEM,MAAM,QAAQ,GAAG,GAAG,CAAA,CAAA;;;;;EAK1B;AAEM,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;;;"}
|