@orbcharts/presets-basic 3.0.0-alpha.1 → 3.0.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/orbcharts-presets-basic.es.js +206 -119
- package/dist/orbcharts-presets-basic.umd.js +1 -1
- package/dist/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING.d.ts +3 -0
- package/dist/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +3 -0
- package/dist/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +3 -0
- package/dist/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +3 -0
- package/dist/src/chartParamsFiles/CP_TOP_AND_NO_BOTTOM_PADDING.d.ts +3 -0
- package/dist/src/chartParamsFiles/index.d.ts +5 -0
- package/dist/src/index.d.ts +5 -0
- package/package.json +1 -1
- package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING.ts +14 -0
- package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT.ts +15 -0
- package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.ts +1 -1
- package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT.ts +15 -0
- package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT.ts +15 -0
- package/src/chartParamsFiles/CP_LEFT_PADDING.ts +1 -1
- package/src/chartParamsFiles/CP_RIGHT_PADDING.ts +1 -1
- package/src/chartParamsFiles/CP_TOP_AND_NO_BOTTOM_PADDING.ts +14 -0
- package/src/chartParamsFiles/index.ts +5 -0
- package/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.ts +0 -2
- package/src/index.ts +35 -14
@@ -1,15 +1,50 @@
|
|
1
|
-
const
|
1
|
+
const l = {
|
2
|
+
id: "CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT",
|
3
|
+
description: "間距下面及左邊留空",
|
4
|
+
data: {
|
5
|
+
padding: {
|
6
|
+
top: 60,
|
7
|
+
right: 60,
|
8
|
+
bottom: 120,
|
9
|
+
left: 120
|
10
|
+
},
|
11
|
+
highlightTarget: "series"
|
12
|
+
}
|
13
|
+
}, O = {
|
14
|
+
id: "CP_BOTTOM_AND_LEFT_PADDING",
|
15
|
+
description: "間距下面及左邊留空",
|
16
|
+
data: {
|
17
|
+
padding: {
|
18
|
+
top: 60,
|
19
|
+
right: 60,
|
20
|
+
bottom: 120,
|
21
|
+
left: 120
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}, E = {
|
2
25
|
id: "CP_BOTTOM_LONG_PADDING",
|
3
26
|
description: "間距下面加長留空",
|
4
27
|
data: {
|
5
28
|
padding: {
|
6
29
|
top: 60,
|
7
30
|
right: 60,
|
8
|
-
bottom:
|
31
|
+
bottom: 140,
|
9
32
|
left: 60
|
10
33
|
}
|
11
34
|
}
|
12
|
-
},
|
35
|
+
}, c = {
|
36
|
+
id: "CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT",
|
37
|
+
description: "間距下面加長留空及highlight系列",
|
38
|
+
data: {
|
39
|
+
padding: {
|
40
|
+
top: 60,
|
41
|
+
right: 60,
|
42
|
+
bottom: 140,
|
43
|
+
left: 60
|
44
|
+
},
|
45
|
+
highlightTarget: "series"
|
46
|
+
}
|
47
|
+
}, D = {
|
13
48
|
id: "CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",
|
14
49
|
description: "間距下面留空及highlight群組",
|
15
50
|
data: {
|
@@ -21,7 +56,19 @@ const T = {
|
|
21
56
|
},
|
22
57
|
highlightTarget: "group"
|
23
58
|
}
|
24
|
-
},
|
59
|
+
}, p = {
|
60
|
+
id: "CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",
|
61
|
+
description: "間距下面留空及highlight系列",
|
62
|
+
data: {
|
63
|
+
padding: {
|
64
|
+
top: 60,
|
65
|
+
right: 60,
|
66
|
+
bottom: 120,
|
67
|
+
left: 60
|
68
|
+
},
|
69
|
+
highlightTarget: "series"
|
70
|
+
}
|
71
|
+
}, N = {
|
25
72
|
id: "CP_BOTTOM_PADDING",
|
26
73
|
description: "間距下面留空",
|
27
74
|
data: {
|
@@ -32,7 +79,7 @@ const T = {
|
|
32
79
|
left: 60
|
33
80
|
}
|
34
81
|
}
|
35
|
-
},
|
82
|
+
}, S = {
|
36
83
|
id: "CP_LEFT_PADDING",
|
37
84
|
description: "間距右邊留空",
|
38
85
|
data: {
|
@@ -40,31 +87,47 @@ const T = {
|
|
40
87
|
top: 60,
|
41
88
|
right: 60,
|
42
89
|
bottom: 60,
|
43
|
-
left:
|
90
|
+
left: 120
|
44
91
|
}
|
45
92
|
}
|
46
|
-
},
|
93
|
+
}, g = {
|
94
|
+
id: "CP_TOP_AND_NO_BOTTOM_PADDING",
|
95
|
+
description: "間距上面留空下面不留空",
|
96
|
+
data: {
|
97
|
+
padding: {
|
98
|
+
top: 140,
|
99
|
+
right: 120,
|
100
|
+
bottom: 0,
|
101
|
+
left: 60
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}, G = {
|
47
105
|
id: "CP_RIGHT_PADDING",
|
48
106
|
description: "間距右邊留空",
|
49
107
|
data: {
|
50
108
|
padding: {
|
51
109
|
top: 60,
|
52
|
-
right:
|
110
|
+
right: 120,
|
53
111
|
bottom: 60,
|
54
112
|
left: 60
|
55
113
|
}
|
56
114
|
}
|
57
|
-
},
|
115
|
+
}, L = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
58
116
|
__proto__: null,
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
117
|
+
CP_BOTTOM_AND_LEFT_PADDING: O,
|
118
|
+
CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT: l,
|
119
|
+
CP_BOTTOM_LONG_PADDING: E,
|
120
|
+
CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT: c,
|
121
|
+
CP_BOTTOM_PADDING: N,
|
122
|
+
CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT: D,
|
123
|
+
CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT: p,
|
124
|
+
CP_LEFT_PADDING: S,
|
125
|
+
CP_RIGHT_PADDING: G,
|
126
|
+
CP_TOP_AND_NO_BOTTOM_PADDING: g
|
127
|
+
}, Symbol.toStringTag, { value: "Module" })), A = {}, m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
65
128
|
__proto__: null,
|
66
|
-
temp:
|
67
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
129
|
+
temp: A
|
130
|
+
}, Symbol.toStringTag, { value: "Module" })), u = {
|
68
131
|
id: "PP_BUBBLES_SCALING_BY_RADIUS",
|
69
132
|
chartType: "series",
|
70
133
|
pluginName: "Bubbles",
|
@@ -72,7 +135,7 @@ const T = {
|
|
72
135
|
data: {
|
73
136
|
bubbleScaleType: "radius"
|
74
137
|
}
|
75
|
-
},
|
138
|
+
}, R = {
|
76
139
|
id: "PP_PIE_DONUT",
|
77
140
|
chartType: "series",
|
78
141
|
pluginName: "Pie",
|
@@ -80,7 +143,7 @@ const T = {
|
|
80
143
|
data: {
|
81
144
|
innerRadius: 0.5
|
82
145
|
}
|
83
|
-
},
|
146
|
+
}, B = {
|
84
147
|
id: "PP_PIE_HALF_DONUT",
|
85
148
|
chartType: "series",
|
86
149
|
pluginName: "Pie",
|
@@ -90,7 +153,7 @@ const T = {
|
|
90
153
|
startAngle: -Math.PI / 2,
|
91
154
|
endAngle: Math.PI / 2
|
92
155
|
}
|
93
|
-
},
|
156
|
+
}, H = {
|
94
157
|
id: "PP_PIE_LABELS_HALF_ANGLE",
|
95
158
|
chartType: "series",
|
96
159
|
pluginName: "PieLabels",
|
@@ -99,7 +162,7 @@ const T = {
|
|
99
162
|
startAngle: -Math.PI / 2,
|
100
163
|
endAngle: Math.PI / 2
|
101
164
|
}
|
102
|
-
},
|
165
|
+
}, h = {
|
103
166
|
id: "PP_PIE_LABELS_INNER",
|
104
167
|
chartType: "series",
|
105
168
|
pluginName: "PieLabels",
|
@@ -108,7 +171,7 @@ const T = {
|
|
108
171
|
labelCentroid: 1.3,
|
109
172
|
labelColorType: "primary"
|
110
173
|
}
|
111
|
-
},
|
174
|
+
}, M = {
|
112
175
|
id: "PP_SERIES_LEGEND_BOTTOM",
|
113
176
|
chartType: "series",
|
114
177
|
pluginName: "SeriesLegend",
|
@@ -116,15 +179,15 @@ const T = {
|
|
116
179
|
data: {
|
117
180
|
listRectRadius: 7
|
118
181
|
}
|
119
|
-
},
|
182
|
+
}, b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
120
183
|
__proto__: null,
|
121
|
-
PP_BUBBLES_SCALING_BY_RADIUS:
|
122
|
-
PP_PIE_DONUT:
|
123
|
-
PP_PIE_HALF_DONUT:
|
124
|
-
PP_PIE_LABELS_HALF_ANGLE:
|
125
|
-
PP_PIE_LABELS_INNER:
|
126
|
-
PP_SERIES_LEGEND_ROUND:
|
127
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
184
|
+
PP_BUBBLES_SCALING_BY_RADIUS: u,
|
185
|
+
PP_PIE_DONUT: R,
|
186
|
+
PP_PIE_HALF_DONUT: B,
|
187
|
+
PP_PIE_LABELS_HALF_ANGLE: H,
|
188
|
+
PP_PIE_LABELS_INNER: h,
|
189
|
+
PP_SERIES_LEGEND_ROUND: M
|
190
|
+
}, Symbol.toStringTag, { value: "Module" })), C = {
|
128
191
|
id: "DF_BOTTOM_VALUE_AXIS",
|
129
192
|
chartType: "grid",
|
130
193
|
description: "底部橫向資料圖軸",
|
@@ -136,10 +199,10 @@ const T = {
|
|
136
199
|
position: "left"
|
137
200
|
}
|
138
201
|
}
|
139
|
-
},
|
202
|
+
}, y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
140
203
|
__proto__: null,
|
141
|
-
DF_BOTTOM_VALUE_AXIS:
|
142
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
204
|
+
DF_BOTTOM_VALUE_AXIS: C
|
205
|
+
}, Symbol.toStringTag, { value: "Module" })), F = {
|
143
206
|
id: "PP_BARS_ROUND",
|
144
207
|
chartType: "grid",
|
145
208
|
pluginName: "Bars",
|
@@ -150,7 +213,7 @@ const T = {
|
|
150
213
|
barGroupPadding: 10,
|
151
214
|
barRadius: !0
|
152
215
|
}
|
153
|
-
},
|
216
|
+
}, U = {
|
154
217
|
id: "PP_BARS_THIN",
|
155
218
|
chartType: "grid",
|
156
219
|
pluginName: "Bars",
|
@@ -160,17 +223,15 @@ const T = {
|
|
160
223
|
barPadding: 1,
|
161
224
|
barGroupPadding: 10
|
162
225
|
}
|
163
|
-
},
|
226
|
+
}, f = {
|
164
227
|
id: "PP_DOTS_ONLY_SHOW_HIGHLIGHTED",
|
165
228
|
chartType: "grid",
|
166
229
|
pluginName: "Dots",
|
167
230
|
description: "顯示highlight圓點",
|
168
231
|
data: {
|
169
|
-
radius: 3,
|
170
|
-
fillColorType: "series",
|
171
232
|
onlyShowHighlighted: !1
|
172
233
|
}
|
173
|
-
},
|
234
|
+
}, j = {
|
174
235
|
id: "PP_DOTS_SOLID",
|
175
236
|
chartType: "grid",
|
176
237
|
pluginName: "Dots",
|
@@ -180,7 +241,7 @@ const T = {
|
|
180
241
|
fillColorType: "series",
|
181
242
|
onlyShowHighlighted: !1
|
182
243
|
}
|
183
|
-
},
|
244
|
+
}, W = {
|
184
245
|
id: "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST",
|
185
246
|
chartType: "grid",
|
186
247
|
pluginName: "GridLegend",
|
@@ -191,7 +252,7 @@ const T = {
|
|
191
252
|
padding: 14,
|
192
253
|
listRectHeight: 2
|
193
254
|
}
|
194
|
-
},
|
255
|
+
}, v = {
|
195
256
|
id: "PP_GRID_LEGEND_BOTTOM",
|
196
257
|
chartType: "grid",
|
197
258
|
pluginName: "GridLegend",
|
@@ -201,7 +262,7 @@ const T = {
|
|
201
262
|
justify: "center",
|
202
263
|
padding: 14
|
203
264
|
}
|
204
|
-
},
|
265
|
+
}, V = {
|
205
266
|
id: "PP_GROUP_AXIS_ROTATE_LABEL",
|
206
267
|
chartType: "grid",
|
207
268
|
pluginName: "GroupAxis",
|
@@ -209,7 +270,7 @@ const T = {
|
|
209
270
|
data: {
|
210
271
|
tickTextRotate: 40
|
211
272
|
}
|
212
|
-
},
|
273
|
+
}, z = {
|
213
274
|
id: "PP_LINES_CURVE",
|
214
275
|
chartType: "grid",
|
215
276
|
pluginName: "Lines",
|
@@ -218,130 +279,156 @@ const T = {
|
|
218
279
|
lineCurve: "curveMonotoneX",
|
219
280
|
lineWidth: 3
|
220
281
|
}
|
221
|
-
},
|
222
|
-
__proto__: null,
|
223
|
-
PP_BARS_ROUND: h,
|
224
|
-
PP_BARS_THIN: H,
|
225
|
-
PP_DOTS_ONLY_SHOW_HIGHLIGHTED: y,
|
226
|
-
PP_DOTS_SOLID: M,
|
227
|
-
PP_GRID_LEGEND_BOTTOM: f,
|
228
|
-
PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST: U,
|
229
|
-
PP_GROUP_AXIS_ROTATE_LABEL: F,
|
230
|
-
PP_LINES_CURVE: C
|
231
|
-
}, Symbol.toStringTag, { value: "Module" })), v = {}, W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
232
|
-
__proto__: null,
|
233
|
-
temp: v
|
234
|
-
}, Symbol.toStringTag, { value: "Module" })), z = {}, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
282
|
+
}, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
235
283
|
__proto__: null,
|
236
|
-
|
237
|
-
|
284
|
+
PP_BARS_ROUND: F,
|
285
|
+
PP_BARS_THIN: U,
|
286
|
+
PP_DOTS_ONLY_SHOW_HIGHLIGHTED: f,
|
287
|
+
PP_DOTS_SOLID: j,
|
288
|
+
PP_GRID_LEGEND_BOTTOM: v,
|
289
|
+
PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST: W,
|
290
|
+
PP_GROUP_AXIS_ROTATE_LABEL: V,
|
291
|
+
PP_LINES_CURVE: z
|
292
|
+
}, Symbol.toStringTag, { value: "Module" })), $ = {}, Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
238
293
|
__proto__: null,
|
239
|
-
temp:
|
240
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
294
|
+
temp: $
|
295
|
+
}, Symbol.toStringTag, { value: "Module" })), x = {}, Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
241
296
|
__proto__: null,
|
242
|
-
temp:
|
297
|
+
temp: x
|
243
298
|
}, Symbol.toStringTag, { value: "Module" })), w = {}, k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
244
299
|
__proto__: null,
|
245
300
|
temp: w
|
246
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
301
|
+
}, Symbol.toStringTag, { value: "Module" })), q = {}, J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
302
|
+
__proto__: null,
|
303
|
+
temp: q
|
304
|
+
}, Symbol.toStringTag, { value: "Module" })), K = {}, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
305
|
+
__proto__: null,
|
306
|
+
temp: K
|
307
|
+
}, Symbol.toStringTag, { value: "Module" })), __ = {}, t_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
247
308
|
__proto__: null,
|
248
|
-
temp:
|
249
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
309
|
+
temp: __
|
310
|
+
}, Symbol.toStringTag, { value: "Module" })), e_ = {}, a_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
250
311
|
__proto__: null,
|
251
|
-
temp:
|
252
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
312
|
+
temp: e_
|
313
|
+
}, Symbol.toStringTag, { value: "Module" })), i_ = {}, P_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
253
314
|
__proto__: null,
|
254
|
-
temp:
|
315
|
+
temp: i_
|
255
316
|
}, Symbol.toStringTag, { value: "Module" })), o = {
|
256
|
-
series:
|
257
|
-
grid:
|
258
|
-
multiGrid:
|
259
|
-
multiValue:
|
260
|
-
relationship:
|
261
|
-
tree:
|
262
|
-
},
|
263
|
-
series:
|
264
|
-
grid:
|
265
|
-
multiGrid:
|
266
|
-
multiValue:
|
267
|
-
relationship:
|
268
|
-
tree:
|
269
|
-
}, s = (t,
|
270
|
-
const n =
|
271
|
-
if (
|
272
|
-
const
|
273
|
-
|
317
|
+
series: m,
|
318
|
+
grid: y,
|
319
|
+
multiGrid: Y,
|
320
|
+
multiValue: k,
|
321
|
+
relationship: Q,
|
322
|
+
tree: a_
|
323
|
+
}, P = {
|
324
|
+
series: b,
|
325
|
+
grid: X,
|
326
|
+
multiGrid: Z,
|
327
|
+
multiValue: J,
|
328
|
+
relationship: t_,
|
329
|
+
tree: P_
|
330
|
+
}, s = (t, e) => {
|
331
|
+
const n = e.chartParamsId ? L[e.chartParamsId].data : void 0, d = o[t][e.dataFormatterId] ? o[t][e.dataFormatterId].data : void 0, T = e.allPluginParamsIds ? e.allPluginParamsIds.reduce((r, i) => {
|
332
|
+
if (P[t][i]) {
|
333
|
+
const I = P[t][i].pluginName;
|
334
|
+
r[I] = P[t][i].data;
|
274
335
|
}
|
275
|
-
return
|
336
|
+
return r;
|
276
337
|
}, {}) : void 0;
|
277
338
|
return {
|
278
339
|
chartParams: n,
|
279
|
-
dataFormatter:
|
280
|
-
allPluginParams:
|
340
|
+
dataFormatter: d,
|
341
|
+
allPluginParams: T
|
281
342
|
};
|
282
|
-
},
|
343
|
+
}, a = (t) => s("series", t), _ = (t) => s("grid", t), r_ = a({
|
283
344
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
284
345
|
allPluginParamsIds: [],
|
285
346
|
description: "基本Series參數"
|
286
|
-
}),
|
347
|
+
}), o_ = a({
|
287
348
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
288
349
|
allPluginParamsIds: ["PP_BUBBLES_SCALING_BY_RADIUS", "PP_SERIES_LEGEND_ROUND"],
|
289
350
|
description: "以半徑尺寸為比例的泡泡圖"
|
290
|
-
}),
|
351
|
+
}), s_ = a({
|
291
352
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
292
353
|
allPluginParamsIds: ["PP_PIE_LABELS_INNER", "PP_SERIES_LEGEND_ROUND"],
|
293
354
|
description: "圓餅圖及內部資料標籤"
|
294
|
-
}),
|
355
|
+
}), n_ = a({
|
295
356
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
296
357
|
allPluginParamsIds: ["PP_PIE_DONUT", "PP_SERIES_LEGEND_ROUND"],
|
297
358
|
description: "甜甜圈圖"
|
298
|
-
}),
|
299
|
-
|
359
|
+
}), d_ = a({
|
360
|
+
chartParamsId: "CP_TOP_AND_NO_BOTTOM_PADDING",
|
300
361
|
allPluginParamsIds: ["PP_PIE_HALF_DONUT", "PP_PIE_LABELS_HALF_ANGLE", "PP_SERIES_LEGEND_ROUND"],
|
301
362
|
description: "半圓甜甜圈圖"
|
302
|
-
}),
|
303
|
-
chartParamsId: "
|
363
|
+
}), T_ = _({
|
364
|
+
chartParamsId: "CP_BOTTOM_PADDING",
|
304
365
|
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
|
305
366
|
description: "基本Grid參數"
|
306
|
-
}),
|
307
|
-
chartParamsId: "
|
367
|
+
}), I_ = _({
|
368
|
+
chartParamsId: "CP_BOTTOM_LONG_PADDING",
|
308
369
|
allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "PP_GRID_LEGEND_BOTTOM"],
|
309
370
|
description: "傾斜標籤"
|
310
|
-
}),
|
371
|
+
}), l_ = _({
|
372
|
+
chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
|
373
|
+
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
374
|
+
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
|
375
|
+
description: "橫向圓角長條圖"
|
376
|
+
}), O_ = _({
|
311
377
|
chartParamsId: "CP_BOTTOM_PADDING",
|
312
378
|
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
313
379
|
description: "圓角長條圖"
|
314
|
-
})
|
315
|
-
|
316
|
-
const nt = e({
|
317
|
-
chartParamsId: "CP_BOTTOM_PADDING",
|
380
|
+
}), E_ = _({
|
381
|
+
chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
|
318
382
|
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
319
383
|
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
320
384
|
description: "橫向圓角長條圖"
|
321
|
-
}),
|
385
|
+
}), c_ = _({
|
322
386
|
chartParamsId: "CP_BOTTOM_PADDING",
|
323
387
|
allPluginParamsIds: ["PP_BARS_THIN", "PP_GRID_LEGEND_BOTTOM"],
|
324
388
|
description: "細長條圖"
|
325
|
-
}),
|
326
|
-
chartParamsId: "
|
389
|
+
}), D_ = _({
|
390
|
+
chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
|
391
|
+
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
392
|
+
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
393
|
+
description: "橫向圓角長條圖"
|
394
|
+
}), p_ = _({
|
395
|
+
chartParamsId: "CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",
|
396
|
+
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
|
397
|
+
description: "基本Grid參數"
|
398
|
+
}), N_ = _({
|
399
|
+
chartParamsId: "CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT",
|
400
|
+
allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "PP_GRID_LEGEND_BOTTOM"],
|
401
|
+
description: "傾斜標籤"
|
402
|
+
}), S_ = _({
|
403
|
+
chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT",
|
404
|
+
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
405
|
+
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
|
406
|
+
description: "橫向圓角長條圖"
|
407
|
+
}), g_ = _({
|
408
|
+
chartParamsId: "CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",
|
327
409
|
allPluginParamsIds: ["PP_LINES_CURVE", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
|
328
410
|
description: "弧線折線圖"
|
329
|
-
}),
|
411
|
+
}), G_ = _({
|
330
412
|
chartParamsId: "CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",
|
331
413
|
allPluginParamsIds: ["PP_DOTS_ONLY_SHOW_HIGHLIGHTED", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
|
332
414
|
description: "折線圖及Highlight Group圓點"
|
333
415
|
});
|
334
416
|
export {
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
417
|
+
E_ as PRESET_BARS_HORIZONTAL_AND_ROUND,
|
418
|
+
D_ as PRESET_BARS_HORIZONTAL_AND_THIN,
|
419
|
+
O_ as PRESET_BARS_ROUND,
|
420
|
+
c_ as PRESET_BARS_THIN,
|
421
|
+
o_ as PRESET_BUBBLES_SCALING_BY_RADIUS,
|
422
|
+
T_ as PRESET_GRID_BASIC,
|
423
|
+
l_ as PRESET_GRID_HORIZONTAL,
|
424
|
+
I_ as PRESET_GRID_ROTATE_AXIS_LABEL,
|
425
|
+
p_ as PRESET_LINES_BASIC,
|
426
|
+
g_ as PRESET_LINES_CURVE,
|
427
|
+
G_ as PRESET_LINES_HIGHLIGHT_GROUP_DOTS,
|
428
|
+
S_ as PRESET_LINES_HORIZONTAL,
|
429
|
+
N_ as PRESET_LINES_ROTATE_AXIS_LABEL,
|
430
|
+
n_ as PRESET_PIE_DONUT,
|
431
|
+
d_ as PRESET_PIE_HALF_DONUT,
|
432
|
+
s_ as PRESET_PIE_WITH_INNER_LABELS,
|
433
|
+
r_ as PRESET_SERIES_BASIC
|
347
434
|
};
|
@@ -1 +1 @@
|
|
1
|
-
(function(_,a){typeof exports=="object"&&typeof module<"u"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(_=typeof globalThis<"u"?globalThis:_||self,a(_["orbcharts-presets-basic"]={}))})(this,function(_){"use strict";const
|
1
|
+
(function(_,a){typeof exports=="object"&&typeof module<"u"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(_=typeof globalThis<"u"?globalThis:_||self,a(_["orbcharts-presets-basic"]={}))})(this,function(_){"use strict";const n=Object.freeze(Object.defineProperty({__proto__:null,CP_BOTTOM_AND_LEFT_PADDING:{id:"CP_BOTTOM_AND_LEFT_PADDING",description:"間距下面及左邊留空",data:{padding:{top:60,right:60,bottom:120,left:120}}},CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT:{id:"CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT",description:"間距下面及左邊留空",data:{padding:{top:60,right:60,bottom:120,left:120},highlightTarget:"series"}},CP_BOTTOM_LONG_PADDING:{id:"CP_BOTTOM_LONG_PADDING",description:"間距下面加長留空",data:{padding:{top:60,right:60,bottom:140,left:60}}},CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT:{id:"CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT",description:"間距下面加長留空及highlight系列",data:{padding:{top:60,right:60,bottom:140,left:60},highlightTarget:"series"}},CP_BOTTOM_PADDING:{id:"CP_BOTTOM_PADDING",description:"間距下面留空",data:{padding:{top:60,right:60,bottom:120,left:60}}},CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT:{id:"CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",description:"間距下面留空及highlight群組",data:{padding:{top:60,right:60,bottom:120,left:60},highlightTarget:"group"}},CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT:{id:"CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",description:"間距下面留空及highlight系列",data:{padding:{top:60,right:60,bottom:120,left:60},highlightTarget:"series"}},CP_LEFT_PADDING:{id:"CP_LEFT_PADDING",description:"間距右邊留空",data:{padding:{top:60,right:60,bottom:60,left:120}}},CP_RIGHT_PADDING:{id:"CP_RIGHT_PADDING",description:"間距右邊留空",data:{padding:{top:60,right:120,bottom:60,left:60}}},CP_TOP_AND_NO_BOTTOM_PADDING:{id:"CP_TOP_AND_NO_BOTTOM_PADDING",description:"間距上面留空下面不留空",data:{padding:{top:140,right:120,bottom:0,left:60}}}},Symbol.toStringTag,{value:"Module"})),d=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),s={id:"PP_BUBBLES_SCALING_BY_RADIUS",chartType:"series",pluginName:"Bubbles",description:"以半徑尺寸為比例的泡泡圖",data:{bubbleScaleType:"radius"}},O={id:"PP_PIE_DONUT",chartType:"series",pluginName:"Pie",description:"甜甜圈圖",data:{innerRadius:.5}},l={id:"PP_PIE_HALF_DONUT",chartType:"series",pluginName:"Pie",description:"半圓甜甜圈圖",data:{innerRadius:.5,startAngle:-Math.PI/2,endAngle:Math.PI/2}},D={id:"PP_PIE_LABELS_HALF_ANGLE",chartType:"series",pluginName:"PieLabels",description:"半圓甜甜圈資料標籤",data:{startAngle:-Math.PI/2,endAngle:Math.PI/2}},S=Object.freeze(Object.defineProperty({__proto__:null,PP_BUBBLES_SCALING_BY_RADIUS:s,PP_PIE_DONUT:O,PP_PIE_HALF_DONUT:l,PP_PIE_LABELS_HALF_ANGLE:D,PP_PIE_LABELS_INNER:{id:"PP_PIE_LABELS_INNER",chartType:"series",pluginName:"PieLabels",description:"圖內資料標籤",data:{labelCentroid:1.3,labelColorType:"primary"}},PP_SERIES_LEGEND_ROUND:{id:"PP_SERIES_LEGEND_BOTTOM",chartType:"series",pluginName:"SeriesLegend",description:"圓型圖例列點",data:{listRectRadius:7}}},Symbol.toStringTag,{value:"Module"})),N=Object.freeze(Object.defineProperty({__proto__:null,DF_BOTTOM_VALUE_AXIS:{id:"DF_BOTTOM_VALUE_AXIS",chartType:"grid",description:"底部橫向資料圖軸",data:{valueAxis:{position:"bottom"},groupAxis:{position:"left"}}}},Symbol.toStringTag,{value:"Module"})),c=Object.freeze(Object.defineProperty({__proto__:null,PP_BARS_ROUND:{id:"PP_BARS_ROUND",chartType:"grid",pluginName:"Bars",description:"圓角長條圖",data:{barWidth:0,barPadding:1,barGroupPadding:10,barRadius:!0}},PP_BARS_THIN:{id:"PP_BARS_THIN",chartType:"grid",pluginName:"Bars",description:"圓角長條圖",data:{barWidth:20,barPadding:1,barGroupPadding:10}},PP_DOTS_ONLY_SHOW_HIGHLIGHTED:{id:"PP_DOTS_ONLY_SHOW_HIGHLIGHTED",chartType:"grid",pluginName:"Dots",description:"顯示highlight圓點",data:{onlyShowHighlighted:!1}},PP_DOTS_SOLID:{id:"PP_DOTS_SOLID",chartType:"grid",pluginName:"Dots",description:"實心圓點",data:{radius:3,fillColorType:"series",onlyShowHighlighted:!1}},PP_GRID_LEGEND_BOTTOM:{id:"PP_GRID_LEGEND_BOTTOM",chartType:"grid",pluginName:"GridLegend",description:"底部圖例",data:{position:"bottom",justify:"center",padding:14}},PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST:{id:"PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST",chartType:"grid",pluginName:"GridLegend",description:"底部圖例及線條列點",data:{position:"bottom",justify:"center",padding:14,listRectHeight:2}},PP_GROUP_AXIS_ROTATE_LABEL:{id:"PP_GROUP_AXIS_ROTATE_LABEL",chartType:"grid",pluginName:"GroupAxis",description:"群組圖軸標籤文字傾斜",data:{tickTextRotate:40}},PP_LINES_CURVE:{id:"PP_LINES_CURVE",chartType:"grid",pluginName:"Lines",description:"圓弧折線圖",data:{lineCurve:"curveMonotoneX",lineWidth:3}}},Symbol.toStringTag,{value:"Module"})),G=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),L=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),A=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),R=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),p=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),g=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),m=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),B=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),r={series:d,grid:N,multiGrid:G,multiValue:A,relationship:p,tree:m},T={series:S,grid:c,multiGrid:L,multiValue:R,relationship:g,tree:B},o=(P,e)=>{const Y=e.chartParamsId?n[e.chartParamsId].data:void 0,Z=r[P][e.dataFormatterId]?r[P][e.dataFormatterId].data:void 0,w=e.allPluginParamsIds?e.allPluginParamsIds.reduce((E,I)=>{if(T[P][I]){const k=T[P][I].pluginName;E[k]=T[P][I].data}return E},{}):void 0;return{chartParams:Y,dataFormatter:Z,allPluginParams:w}},i=P=>o("series",P),t=P=>o("grid",P),H=i({allPluginParamsIds:[],description:"基本Series參數"}),u=i({allPluginParamsIds:["PP_BUBBLES_SCALING_BY_RADIUS","PP_SERIES_LEGEND_ROUND"],description:"以半徑尺寸為比例的泡泡圖"}),h=i({allPluginParamsIds:["PP_PIE_LABELS_INNER","PP_SERIES_LEGEND_ROUND"],description:"圓餅圖及內部資料標籤"}),M=i({allPluginParamsIds:["PP_PIE_DONUT","PP_SERIES_LEGEND_ROUND"],description:"甜甜圈圖"}),b=i({chartParamsId:"CP_TOP_AND_NO_BOTTOM_PADDING",allPluginParamsIds:["PP_PIE_HALF_DONUT","PP_PIE_LABELS_HALF_ANGLE","PP_SERIES_LEGEND_ROUND"],description:"半圓甜甜圈圖"}),C=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"基本Grid參數"}),U=t({chartParamsId:"CP_BOTTOM_LONG_PADDING",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM"],description:"傾斜標籤"}),f=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),F=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"圓角長條圖"}),y=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),W=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_BARS_THIN","PP_GRID_LEGEND_BOTTOM"],description:"細長條圖"}),j=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),v=t({chartParamsId:"CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"基本Grid參數"}),V=t({chartParamsId:"CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM"],description:"傾斜標籤"}),X=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),$=t({chartParamsId:"CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",allPluginParamsIds:["PP_LINES_CURVE","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"弧線折線圖"}),z=t({chartParamsId:"CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",allPluginParamsIds:["PP_DOTS_ONLY_SHOW_HIGHLIGHTED","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"折線圖及Highlight Group圓點"});_.PRESET_BARS_HORIZONTAL_AND_ROUND=y,_.PRESET_BARS_HORIZONTAL_AND_THIN=j,_.PRESET_BARS_ROUND=F,_.PRESET_BARS_THIN=W,_.PRESET_BUBBLES_SCALING_BY_RADIUS=u,_.PRESET_GRID_BASIC=C,_.PRESET_GRID_HORIZONTAL=f,_.PRESET_GRID_ROTATE_AXIS_LABEL=U,_.PRESET_LINES_BASIC=v,_.PRESET_LINES_CURVE=$,_.PRESET_LINES_HIGHLIGHT_GROUP_DOTS=z,_.PRESET_LINES_HORIZONTAL=X,_.PRESET_LINES_ROTATE_AXIS_LABEL=V,_.PRESET_PIE_DONUT=M,_.PRESET_PIE_HALF_DONUT=b,_.PRESET_PIE_WITH_INNER_LABELS=h,_.PRESET_SERIES_BASIC=H,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|
@@ -1,5 +1,10 @@
|
|
1
|
+
export { CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT';
|
2
|
+
export { CP_BOTTOM_AND_LEFT_PADDING } from './CP_BOTTOM_AND_LEFT_PADDING';
|
1
3
|
export { CP_BOTTOM_LONG_PADDING } from './CP_BOTTOM_LONG_PADDING';
|
4
|
+
export { CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT';
|
2
5
|
export { CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT';
|
6
|
+
export { CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT';
|
3
7
|
export { CP_BOTTOM_PADDING } from './CP_BOTTOM_PADDING';
|
4
8
|
export { CP_LEFT_PADDING } from './CP_LEFT_PADDING';
|
9
|
+
export { CP_TOP_AND_NO_BOTTOM_PADDING } from './CP_TOP_AND_NO_BOTTOM_PADDING';
|
5
10
|
export { CP_RIGHT_PADDING } from './CP_RIGHT_PADDING';
|
package/dist/src/index.d.ts
CHANGED
@@ -5,8 +5,13 @@ export declare const PRESET_PIE_DONUT: import('@orbcharts/core').PresetPartial<"
|
|
5
5
|
export declare const PRESET_PIE_HALF_DONUT: import('@orbcharts/core').PresetPartial<"series">;
|
6
6
|
export declare const PRESET_GRID_BASIC: import('@orbcharts/core').PresetPartial<"grid">;
|
7
7
|
export declare const PRESET_GRID_ROTATE_AXIS_LABEL: import('@orbcharts/core').PresetPartial<"grid">;
|
8
|
+
export declare const PRESET_GRID_HORIZONTAL: import('@orbcharts/core').PresetPartial<"grid">;
|
8
9
|
export declare const PRESET_BARS_ROUND: import('@orbcharts/core').PresetPartial<"grid">;
|
9
10
|
export declare const PRESET_BARS_HORIZONTAL_AND_ROUND: import('@orbcharts/core').PresetPartial<"grid">;
|
10
11
|
export declare const PRESET_BARS_THIN: import('@orbcharts/core').PresetPartial<"grid">;
|
12
|
+
export declare const PRESET_BARS_HORIZONTAL_AND_THIN: import('@orbcharts/core').PresetPartial<"grid">;
|
13
|
+
export declare const PRESET_LINES_BASIC: import('@orbcharts/core').PresetPartial<"grid">;
|
14
|
+
export declare const PRESET_LINES_ROTATE_AXIS_LABEL: import('@orbcharts/core').PresetPartial<"grid">;
|
15
|
+
export declare const PRESET_LINES_HORIZONTAL: import('@orbcharts/core').PresetPartial<"grid">;
|
11
16
|
export declare const PRESET_LINES_CURVE: import('@orbcharts/core').PresetPartial<"grid">;
|
12
17
|
export declare const PRESET_LINES_HIGHLIGHT_GROUP_DOTS: import('@orbcharts/core').PresetPartial<"grid">;
|
package/package.json
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_BOTTOM_AND_LEFT_PADDING: ChartParamsFile = {
|
4
|
+
id: 'CP_BOTTOM_AND_LEFT_PADDING',
|
5
|
+
description: '間距下面及左邊留空',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 60,
|
9
|
+
right: 60,
|
10
|
+
bottom: 120,
|
11
|
+
left: 120
|
12
|
+
},
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT: ChartParamsFile = {
|
4
|
+
id: 'CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT',
|
5
|
+
description: '間距下面及左邊留空',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 60,
|
9
|
+
right: 60,
|
10
|
+
bottom: 120,
|
11
|
+
left: 120
|
12
|
+
},
|
13
|
+
highlightTarget: 'series'
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT: ChartParamsFile = {
|
4
|
+
id: 'CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT',
|
5
|
+
description: '間距下面加長留空及highlight系列',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 60,
|
9
|
+
right: 60,
|
10
|
+
bottom: 140,
|
11
|
+
left: 60
|
12
|
+
},
|
13
|
+
highlightTarget: 'series'
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT: ChartParamsFile = {
|
4
|
+
id: 'CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT',
|
5
|
+
description: '間距下面留空及highlight系列',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 60,
|
9
|
+
right: 60,
|
10
|
+
bottom: 120,
|
11
|
+
left: 60
|
12
|
+
},
|
13
|
+
highlightTarget: 'series'
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_TOP_AND_NO_BOTTOM_PADDING: ChartParamsFile = {
|
4
|
+
id: 'CP_TOP_AND_NO_BOTTOM_PADDING',
|
5
|
+
description: '間距上面留空下面不留空',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 140,
|
9
|
+
right: 120,
|
10
|
+
bottom: 0,
|
11
|
+
left: 60
|
12
|
+
},
|
13
|
+
}
|
14
|
+
}
|
@@ -1,5 +1,10 @@
|
|
1
|
+
export { CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT'
|
2
|
+
export { CP_BOTTOM_AND_LEFT_PADDING } from './CP_BOTTOM_AND_LEFT_PADDING'
|
1
3
|
export { CP_BOTTOM_LONG_PADDING } from './CP_BOTTOM_LONG_PADDING'
|
4
|
+
export { CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT'
|
2
5
|
export { CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT'
|
6
|
+
export { CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT'
|
3
7
|
export { CP_BOTTOM_PADDING } from './CP_BOTTOM_PADDING'
|
4
8
|
export { CP_LEFT_PADDING } from './CP_LEFT_PADDING'
|
9
|
+
export { CP_TOP_AND_NO_BOTTOM_PADDING } from './CP_TOP_AND_NO_BOTTOM_PADDING'
|
5
10
|
export { CP_RIGHT_PADDING } from './CP_RIGHT_PADDING'
|
package/src/index.ts
CHANGED
@@ -31,7 +31,7 @@ export const PRESET_PIE_DONUT = createSeriesPreset({
|
|
31
31
|
description: '甜甜圈圖'
|
32
32
|
})
|
33
33
|
export const PRESET_PIE_HALF_DONUT = createSeriesPreset({
|
34
|
-
|
34
|
+
chartParamsId: 'CP_TOP_AND_NO_BOTTOM_PADDING',
|
35
35
|
allPluginParamsIds: ['PP_PIE_HALF_DONUT', 'PP_PIE_LABELS_HALF_ANGLE', 'PP_SERIES_LEGEND_ROUND'],
|
36
36
|
description: '半圓甜甜圈圖'
|
37
37
|
})
|
@@ -39,24 +39,29 @@ export const PRESET_PIE_HALF_DONUT = createSeriesPreset({
|
|
39
39
|
// -- grid --
|
40
40
|
// 通用 - PRESET_GRID_[name]
|
41
41
|
export const PRESET_GRID_BASIC = createGridPreset({
|
42
|
-
chartParamsId: '
|
42
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
43
43
|
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
|
44
44
|
description: '基本Grid參數'
|
45
45
|
})
|
46
46
|
export const PRESET_GRID_ROTATE_AXIS_LABEL = createGridPreset({
|
47
|
-
chartParamsId: '
|
47
|
+
chartParamsId: 'CP_BOTTOM_LONG_PADDING',
|
48
48
|
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM'],
|
49
49
|
description: '傾斜標籤'
|
50
50
|
})
|
51
|
+
export const PRESET_GRID_HORIZONTAL = createGridPreset({
|
52
|
+
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
|
53
|
+
dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
54
|
+
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
|
55
|
+
description: '橫向圓角長條圖'
|
56
|
+
})
|
51
57
|
// Bars - PRESET_BARS_[name]
|
52
58
|
export const PRESET_BARS_ROUND = createGridPreset({
|
53
59
|
chartParamsId: 'CP_BOTTOM_PADDING',
|
54
60
|
allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
|
55
61
|
description: '圓角長條圖'
|
56
62
|
})
|
57
|
-
console.log(PRESET_BARS_ROUND)
|
58
63
|
export const PRESET_BARS_HORIZONTAL_AND_ROUND = createGridPreset({
|
59
|
-
chartParamsId: '
|
64
|
+
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
|
60
65
|
dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
61
66
|
allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
|
62
67
|
description: '橫向圓角長條圖'
|
@@ -66,25 +71,41 @@ export const PRESET_BARS_THIN = createGridPreset({
|
|
66
71
|
allPluginParamsIds: ['PP_BARS_THIN', 'PP_GRID_LEGEND_BOTTOM'],
|
67
72
|
description: '細長條圖'
|
68
73
|
})
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
export const PRESET_BARS_HORIZONTAL_AND_THIN = createGridPreset({
|
75
|
+
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
|
76
|
+
dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
77
|
+
allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
|
78
|
+
description: '橫向圓角長條圖'
|
79
|
+
})
|
75
80
|
// Lines - PRESET_LINES_[name]
|
81
|
+
export const PRESET_LINES_BASIC = createGridPreset({
|
82
|
+
chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
|
83
|
+
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
|
84
|
+
description: '基本Grid參數'
|
85
|
+
})
|
86
|
+
export const PRESET_LINES_ROTATE_AXIS_LABEL = createGridPreset({
|
87
|
+
chartParamsId: 'CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT',
|
88
|
+
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM'],
|
89
|
+
description: '傾斜標籤'
|
90
|
+
})
|
91
|
+
export const PRESET_LINES_HORIZONTAL = createGridPreset({
|
92
|
+
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT',
|
93
|
+
dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
94
|
+
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
|
95
|
+
description: '橫向圓角長條圖'
|
96
|
+
})
|
76
97
|
// export const PRESET_LINES_WITH_SOLID_DOTS = createGridPreset({
|
77
|
-
// chartParamsId: '
|
98
|
+
// chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
|
78
99
|
// allPluginParamsIds: ['PP_DOTS_SOLID', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
79
100
|
// description: '折線圖及實心圓點'
|
80
101
|
// })
|
81
102
|
export const PRESET_LINES_CURVE = createGridPreset({
|
82
|
-
chartParamsId: '
|
103
|
+
chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
|
83
104
|
allPluginParamsIds: ['PP_LINES_CURVE', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
84
105
|
description: '弧線折線圖'
|
85
106
|
})
|
86
107
|
// export const PRESET_LINES_CURVES_WITH_SOLID_DOTS = createGridPreset({
|
87
|
-
// chartParamsId: '
|
108
|
+
// chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
|
88
109
|
// allPluginParamsIds: ['PP_LINES_CURVE', 'PP_DOTS_SOLID', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
89
110
|
// description: '弧線折線圖及實心圓點'
|
90
111
|
// })
|