@orbcharts/presets-basic 3.0.0-alpha.3 → 3.0.0-alpha.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/orbcharts-presets-basic.es.js +118 -86
- package/dist/orbcharts-presets-basic.umd.js +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/multiGridPluginParamsFiles/MultiGridLegend/PP_MULTI_GRID_LEGEND_BOTTOM.d.ts +4 -0
- package/dist/src/multiGridPluginParamsFiles/MultiGridLegend/PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST.d.ts +4 -0
- package/dist/src/multiGridPluginParamsFiles/MultiGridLegend/index.d.ts +2 -0
- package/dist/src/multiGridPluginParamsFiles/index.d.ts +1 -1
- package/dist/src/types.d.ts +5 -1
- package/package.json +3 -3
- package/src/index.ts +12 -3
- package/src/multiGridPluginParamsFiles/MultiGridLegend/PP_MULTI_GRID_LEGEND_BOTTOM.ts +14 -0
- package/src/multiGridPluginParamsFiles/MultiGridLegend/PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST.ts +21 -0
- package/src/multiGridPluginParamsFiles/MultiGridLegend/index.ts +2 -0
- package/src/multiGridPluginParamsFiles/index.ts +1 -1
- package/src/types.ts +3 -1
@@ -10,7 +10,7 @@ const l = {
|
|
10
10
|
},
|
11
11
|
highlightTarget: "series"
|
12
12
|
}
|
13
|
-
},
|
13
|
+
}, E = {
|
14
14
|
id: "CP_BOTTOM_AND_LEFT_PADDING",
|
15
15
|
description: "間距下面及左邊留空",
|
16
16
|
data: {
|
@@ -21,7 +21,7 @@ const l = {
|
|
21
21
|
left: 120
|
22
22
|
}
|
23
23
|
}
|
24
|
-
},
|
24
|
+
}, O = {
|
25
25
|
id: "CP_BOTTOM_LONG_PADDING",
|
26
26
|
description: "間距下面加長留空",
|
27
27
|
data: {
|
@@ -56,7 +56,7 @@ const l = {
|
|
56
56
|
},
|
57
57
|
highlightTarget: "group"
|
58
58
|
}
|
59
|
-
},
|
59
|
+
}, N = {
|
60
60
|
id: "CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",
|
61
61
|
description: "間距下面留空及highlight系列",
|
62
62
|
data: {
|
@@ -68,7 +68,7 @@ const l = {
|
|
68
68
|
},
|
69
69
|
highlightTarget: "series"
|
70
70
|
}
|
71
|
-
},
|
71
|
+
}, G = {
|
72
72
|
id: "CP_BOTTOM_PADDING",
|
73
73
|
description: "間距下面留空",
|
74
74
|
data: {
|
@@ -79,7 +79,7 @@ const l = {
|
|
79
79
|
left: 60
|
80
80
|
}
|
81
81
|
}
|
82
|
-
},
|
82
|
+
}, p = {
|
83
83
|
id: "CP_LEFT_PADDING",
|
84
84
|
description: "間距右邊留空",
|
85
85
|
data: {
|
@@ -90,7 +90,7 @@ const l = {
|
|
90
90
|
left: 120
|
91
91
|
}
|
92
92
|
}
|
93
|
-
},
|
93
|
+
}, L = {
|
94
94
|
id: "CP_TOP_AND_NO_BOTTOM_PADDING",
|
95
95
|
description: "間距上面留空下面不留空",
|
96
96
|
data: {
|
@@ -101,7 +101,7 @@ const l = {
|
|
101
101
|
left: 60
|
102
102
|
}
|
103
103
|
}
|
104
|
-
},
|
104
|
+
}, S = {
|
105
105
|
id: "CP_RIGHT_PADDING",
|
106
106
|
description: "間距右邊留空",
|
107
107
|
data: {
|
@@ -112,21 +112,21 @@ const l = {
|
|
112
112
|
left: 60
|
113
113
|
}
|
114
114
|
}
|
115
|
-
},
|
115
|
+
}, g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
116
116
|
__proto__: null,
|
117
|
-
CP_BOTTOM_AND_LEFT_PADDING:
|
117
|
+
CP_BOTTOM_AND_LEFT_PADDING: E,
|
118
118
|
CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT: l,
|
119
|
-
CP_BOTTOM_LONG_PADDING:
|
119
|
+
CP_BOTTOM_LONG_PADDING: O,
|
120
120
|
CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT: c,
|
121
|
-
CP_BOTTOM_PADDING:
|
121
|
+
CP_BOTTOM_PADDING: G,
|
122
122
|
CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT: D,
|
123
|
-
CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT:
|
124
|
-
CP_LEFT_PADDING:
|
125
|
-
CP_RIGHT_PADDING:
|
126
|
-
CP_TOP_AND_NO_BOTTOM_PADDING:
|
127
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
123
|
+
CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT: N,
|
124
|
+
CP_LEFT_PADDING: p,
|
125
|
+
CP_RIGHT_PADDING: S,
|
126
|
+
CP_TOP_AND_NO_BOTTOM_PADDING: L
|
127
|
+
}, Symbol.toStringTag, { value: "Module" })), m = {}, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
128
128
|
__proto__: null,
|
129
|
-
temp:
|
129
|
+
temp: m
|
130
130
|
}, Symbol.toStringTag, { value: "Module" })), u = {
|
131
131
|
id: "PP_BUBBLES_SCALING_BY_RADIUS",
|
132
132
|
chartType: "series",
|
@@ -162,7 +162,7 @@ const l = {
|
|
162
162
|
startAngle: -Math.PI / 2,
|
163
163
|
endAngle: Math.PI / 2
|
164
164
|
}
|
165
|
-
},
|
165
|
+
}, M = {
|
166
166
|
id: "PP_PIE_LABELS_INNER",
|
167
167
|
chartType: "series",
|
168
168
|
pluginName: "PieLabels",
|
@@ -171,7 +171,7 @@ const l = {
|
|
171
171
|
labelCentroid: 1.3,
|
172
172
|
labelColorType: "primary"
|
173
173
|
}
|
174
|
-
},
|
174
|
+
}, h = {
|
175
175
|
id: "PP_SERIES_LEGEND_BOTTOM",
|
176
176
|
chartType: "series",
|
177
177
|
pluginName: "SeriesLegend",
|
@@ -185,8 +185,8 @@ const l = {
|
|
185
185
|
PP_PIE_DONUT: R,
|
186
186
|
PP_PIE_HALF_DONUT: B,
|
187
187
|
PP_PIE_LABELS_HALF_ANGLE: H,
|
188
|
-
PP_PIE_LABELS_INNER:
|
189
|
-
PP_SERIES_LEGEND_ROUND:
|
188
|
+
PP_PIE_LABELS_INNER: M,
|
189
|
+
PP_SERIES_LEGEND_ROUND: h
|
190
190
|
}, Symbol.toStringTag, { value: "Module" })), C = {
|
191
191
|
id: "DF_BOTTOM_VALUE_AXIS",
|
192
192
|
chartType: "grid",
|
@@ -202,7 +202,7 @@ const l = {
|
|
202
202
|
}, y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
203
203
|
__proto__: null,
|
204
204
|
DF_BOTTOM_VALUE_AXIS: C
|
205
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
205
|
+
}, Symbol.toStringTag, { value: "Module" })), U = {
|
206
206
|
id: "PP_BARS_ROUND",
|
207
207
|
chartType: "grid",
|
208
208
|
pluginName: "Bars",
|
@@ -213,7 +213,7 @@ const l = {
|
|
213
213
|
barGroupPadding: 10,
|
214
214
|
barRadius: !0
|
215
215
|
}
|
216
|
-
},
|
216
|
+
}, F = {
|
217
217
|
id: "PP_BARS_THIN",
|
218
218
|
chartType: "grid",
|
219
219
|
pluginName: "Bars",
|
@@ -281,8 +281,8 @@ const l = {
|
|
281
281
|
}
|
282
282
|
}, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
283
283
|
__proto__: null,
|
284
|
-
PP_BARS_ROUND:
|
285
|
-
PP_BARS_THIN:
|
284
|
+
PP_BARS_ROUND: U,
|
285
|
+
PP_BARS_THIN: F,
|
286
286
|
PP_DOTS_ONLY_SHOW_HIGHLIGHTED: f,
|
287
287
|
PP_DOTS_SOLID: j,
|
288
288
|
PP_GRID_LEGEND_BOTTOM: v,
|
@@ -292,143 +292,175 @@ const l = {
|
|
292
292
|
}, Symbol.toStringTag, { value: "Module" })), $ = {}, Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
293
293
|
__proto__: null,
|
294
294
|
temp: $
|
295
|
-
}, Symbol.toStringTag, { value: "Module" })), x = {
|
296
|
-
|
297
|
-
|
298
|
-
|
295
|
+
}, Symbol.toStringTag, { value: "Module" })), x = {
|
296
|
+
id: "PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST",
|
297
|
+
chartType: "multiGrid",
|
298
|
+
pluginName: "MultiGridLegend",
|
299
|
+
description: "底部圖例及線條列點",
|
300
|
+
data: {
|
301
|
+
position: "bottom",
|
302
|
+
justify: "center",
|
303
|
+
padding: 14,
|
304
|
+
gridList: [
|
305
|
+
{},
|
306
|
+
{
|
307
|
+
listRectHeight: 2
|
308
|
+
}
|
309
|
+
]
|
310
|
+
}
|
311
|
+
}, Z = {
|
312
|
+
id: "PP_GRID_LEGEND_BOTTOM",
|
313
|
+
chartType: "multiGrid",
|
314
|
+
pluginName: "MultiGridLegend",
|
315
|
+
description: "底部圖例",
|
316
|
+
data: {
|
317
|
+
position: "bottom",
|
318
|
+
justify: "center",
|
319
|
+
padding: 14
|
320
|
+
}
|
321
|
+
}, w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
299
322
|
__proto__: null,
|
300
|
-
|
301
|
-
|
323
|
+
PP_GRID_LEGEND_BOTTOM: Z,
|
324
|
+
PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST: x
|
325
|
+
}, Symbol.toStringTag, { value: "Module" })), k = {}, q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
302
326
|
__proto__: null,
|
303
|
-
temp:
|
304
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
327
|
+
temp: k
|
328
|
+
}, Symbol.toStringTag, { value: "Module" })), J = {}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
305
329
|
__proto__: null,
|
306
|
-
temp:
|
307
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
330
|
+
temp: J
|
331
|
+
}, Symbol.toStringTag, { value: "Module" })), Q = {}, __ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
308
332
|
__proto__: null,
|
309
|
-
temp:
|
310
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
333
|
+
temp: Q
|
334
|
+
}, Symbol.toStringTag, { value: "Module" })), t_ = {}, e_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
311
335
|
__proto__: null,
|
312
|
-
temp:
|
313
|
-
}, Symbol.toStringTag, { value: "Module" })), i_ = {},
|
336
|
+
temp: t_
|
337
|
+
}, Symbol.toStringTag, { value: "Module" })), i_ = {}, a_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
314
338
|
__proto__: null,
|
315
339
|
temp: i_
|
316
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
317
|
-
|
340
|
+
}, Symbol.toStringTag, { value: "Module" })), P_ = {}, r_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
341
|
+
__proto__: null,
|
342
|
+
temp: P_
|
343
|
+
}, Symbol.toStringTag, { value: "Module" })), T = {
|
344
|
+
series: A,
|
318
345
|
grid: y,
|
319
346
|
multiGrid: Y,
|
320
|
-
multiValue:
|
321
|
-
relationship:
|
347
|
+
multiValue: q,
|
348
|
+
relationship: __,
|
322
349
|
tree: a_
|
323
350
|
}, P = {
|
324
351
|
series: b,
|
325
352
|
grid: X,
|
326
|
-
multiGrid:
|
327
|
-
multiValue:
|
328
|
-
relationship:
|
329
|
-
tree:
|
330
|
-
},
|
331
|
-
const
|
332
|
-
if (P[t][
|
333
|
-
const
|
334
|
-
|
353
|
+
multiGrid: w,
|
354
|
+
multiValue: K,
|
355
|
+
relationship: e_,
|
356
|
+
tree: r_
|
357
|
+
}, r = (t, e) => {
|
358
|
+
const s = e.chartParamsId ? g[e.chartParamsId].data : void 0, d = T[t][e.dataFormatterId] ? T[t][e.dataFormatterId].data : void 0, I = e.allPluginParamsIds ? e.allPluginParamsIds.reduce((o, a) => {
|
359
|
+
if (P[t][a]) {
|
360
|
+
const n = P[t][a].pluginName;
|
361
|
+
o[n] = P[t][a].data;
|
335
362
|
}
|
336
|
-
return
|
363
|
+
return o;
|
337
364
|
}, {}) : void 0;
|
338
365
|
return {
|
339
|
-
chartParams:
|
366
|
+
chartParams: s,
|
340
367
|
dataFormatter: d,
|
341
|
-
allPluginParams:
|
368
|
+
allPluginParams: I
|
342
369
|
};
|
343
|
-
},
|
370
|
+
}, i = (t) => r("series", t), _ = (t) => r("grid", t), o_ = (t) => r("multiGrid", t), T_ = i({
|
344
371
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
345
372
|
allPluginParamsIds: [],
|
346
373
|
description: "基本Series參數"
|
347
|
-
}),
|
374
|
+
}), s_ = i({
|
348
375
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
349
376
|
allPluginParamsIds: ["PP_BUBBLES_SCALING_BY_RADIUS", "PP_SERIES_LEGEND_ROUND"],
|
350
377
|
description: "以半徑尺寸為比例的泡泡圖"
|
351
|
-
}),
|
378
|
+
}), d_ = i({
|
352
379
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
353
380
|
allPluginParamsIds: ["PP_PIE_LABELS_INNER", "PP_SERIES_LEGEND_ROUND"],
|
354
381
|
description: "圓餅圖及內部資料標籤"
|
355
|
-
}),
|
382
|
+
}), I_ = i({
|
356
383
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
357
384
|
allPluginParamsIds: ["PP_PIE_DONUT", "PP_SERIES_LEGEND_ROUND"],
|
358
385
|
description: "甜甜圈圖"
|
359
|
-
}),
|
386
|
+
}), n_ = i({
|
360
387
|
chartParamsId: "CP_TOP_AND_NO_BOTTOM_PADDING",
|
361
388
|
allPluginParamsIds: ["PP_PIE_HALF_DONUT", "PP_PIE_LABELS_HALF_ANGLE", "PP_SERIES_LEGEND_ROUND"],
|
362
389
|
description: "半圓甜甜圈圖"
|
363
|
-
}),
|
390
|
+
}), l_ = _({
|
364
391
|
chartParamsId: "CP_BOTTOM_PADDING",
|
365
392
|
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
|
366
393
|
description: "基本Grid參數"
|
367
|
-
}),
|
394
|
+
}), E_ = _({
|
368
395
|
chartParamsId: "CP_BOTTOM_LONG_PADDING",
|
369
396
|
allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "PP_GRID_LEGEND_BOTTOM"],
|
370
397
|
description: "傾斜標籤"
|
371
|
-
}),
|
398
|
+
}), O_ = _({
|
372
399
|
chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
|
373
400
|
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
374
401
|
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
|
375
402
|
description: "橫向圓角長條圖"
|
376
|
-
}),
|
403
|
+
}), c_ = _({
|
377
404
|
chartParamsId: "CP_BOTTOM_PADDING",
|
378
405
|
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
379
406
|
description: "圓角長條圖"
|
380
|
-
}),
|
407
|
+
}), D_ = _({
|
381
408
|
chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
|
382
409
|
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
383
410
|
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
384
411
|
description: "橫向圓角長條圖"
|
385
|
-
}),
|
412
|
+
}), N_ = _({
|
386
413
|
chartParamsId: "CP_BOTTOM_PADDING",
|
387
414
|
allPluginParamsIds: ["PP_BARS_THIN", "PP_GRID_LEGEND_BOTTOM"],
|
388
415
|
description: "細長條圖"
|
389
|
-
}),
|
416
|
+
}), G_ = _({
|
390
417
|
chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
|
391
418
|
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
392
419
|
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
393
420
|
description: "橫向圓角長條圖"
|
394
421
|
}), p_ = _({
|
395
422
|
chartParamsId: "CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",
|
396
|
-
allPluginParamsIds: ["
|
423
|
+
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
|
397
424
|
description: "基本Grid參數"
|
398
|
-
}),
|
425
|
+
}), L_ = _({
|
399
426
|
chartParamsId: "CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT",
|
400
|
-
allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "
|
427
|
+
allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
|
401
428
|
description: "傾斜標籤"
|
402
429
|
}), S_ = _({
|
403
430
|
chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT",
|
404
431
|
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
405
|
-
allPluginParamsIds: ["
|
432
|
+
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
|
406
433
|
description: "橫向圓角長條圖"
|
407
434
|
}), g_ = _({
|
408
435
|
chartParamsId: "CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",
|
409
436
|
allPluginParamsIds: ["PP_LINES_CURVE", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
|
410
437
|
description: "弧線折線圖"
|
411
|
-
}),
|
438
|
+
}), m_ = _({
|
412
439
|
chartParamsId: "CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",
|
413
440
|
allPluginParamsIds: ["PP_DOTS_ONLY_SHOW_HIGHLIGHTED", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
|
414
441
|
description: "折線圖及Highlight Group圓點"
|
442
|
+
}), A_ = o_({
|
443
|
+
chartParamsId: "CP_BOTTOM_PADDING",
|
444
|
+
allPluginParamsIds: ["PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST"],
|
445
|
+
description: "基本MultiGrid參數"
|
415
446
|
});
|
416
447
|
export {
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
448
|
+
D_ as PRESET_BARS_HORIZONTAL_AND_ROUND,
|
449
|
+
G_ as PRESET_BARS_HORIZONTAL_AND_THIN,
|
450
|
+
c_ as PRESET_BARS_ROUND,
|
451
|
+
N_ as PRESET_BARS_THIN,
|
452
|
+
s_ as PRESET_BUBBLES_SCALING_BY_RADIUS,
|
453
|
+
l_ as PRESET_GRID_BASIC,
|
454
|
+
O_ as PRESET_GRID_HORIZONTAL,
|
455
|
+
E_ as PRESET_GRID_ROTATE_AXIS_LABEL,
|
425
456
|
p_ as PRESET_LINES_BASIC,
|
426
457
|
g_ as PRESET_LINES_CURVE,
|
427
|
-
|
458
|
+
m_ as PRESET_LINES_HIGHLIGHT_GROUP_DOTS,
|
428
459
|
S_ as PRESET_LINES_HORIZONTAL,
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
460
|
+
L_ as PRESET_LINES_ROTATE_AXIS_LABEL,
|
461
|
+
A_ as PRESET_MULTI_GRID_BASIC,
|
462
|
+
I_ as PRESET_PIE_DONUT,
|
463
|
+
n_ as PRESET_PIE_HALF_DONUT,
|
464
|
+
d_ as PRESET_PIE_WITH_INNER_LABELS,
|
465
|
+
T_ as PRESET_SERIES_BASIC
|
434
466
|
};
|
@@ -1 +1 @@
|
|
1
|
-
(function(_,
|
1
|
+
(function(_,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(_=typeof globalThis<"u"?globalThis:_||self,T(_["orbcharts-presets-basic"]={}))})(this,function(_){"use strict";const d=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"})),n=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),O={id:"PP_BUBBLES_SCALING_BY_RADIUS",chartType:"series",pluginName:"Bubbles",description:"以半徑尺寸為比例的泡泡圖",data:{bubbleScaleType:"radius"}},s={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}},N=Object.freeze(Object.defineProperty({__proto__:null,PP_BUBBLES_SCALING_BY_RADIUS:O,PP_PIE_DONUT:s,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"})),S=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"})),L=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"})),c=Object.freeze(Object.defineProperty({__proto__:null,PP_GRID_LEGEND_BOTTOM:{id:"PP_GRID_LEGEND_BOTTOM",chartType:"multiGrid",pluginName:"MultiGridLegend",description:"底部圖例",data:{position:"bottom",justify:"center",padding:14}},PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST:{id:"PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST",chartType:"multiGrid",pluginName:"MultiGridLegend",description:"底部圖例及線條列點",data:{position:"bottom",justify:"center",padding:14,gridList:[{},{listRectHeight:2}]}}},Symbol.toStringTag,{value:"Module"})),R=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),A=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"})),E={series:n,grid:S,multiGrid:G,multiValue:R,relationship:p,tree:m},a={series:N,grid:L,multiGrid:c,multiValue:A,relationship:g,tree:B},I=(P,e)=>{const w=e.chartParamsId?d[e.chartParamsId].data:void 0,k=E[P][e.dataFormatterId]?E[P][e.dataFormatterId].data:void 0,q=e.allPluginParamsIds?e.allPluginParamsIds.reduce((o,r)=>{if(a[P][r]){const J=a[P][r].pluginName;o[J]=a[P][r].data}return o},{}):void 0;return{chartParams:w,dataFormatter:k,allPluginParams:q}},i=P=>I("series",P),t=P=>I("grid",P),u=P=>I("multiGrid",P),H=i({allPluginParamsIds:[],description:"基本Series參數"}),M=i({allPluginParamsIds:["PP_BUBBLES_SCALING_BY_RADIUS","PP_SERIES_LEGEND_ROUND"],description:"以半徑尺寸為比例的泡泡圖"}),h=i({allPluginParamsIds:["PP_PIE_LABELS_INNER","PP_SERIES_LEGEND_ROUND"],description:"圓餅圖及內部資料標籤"}),b=i({allPluginParamsIds:["PP_PIE_DONUT","PP_SERIES_LEGEND_ROUND"],description:"甜甜圈圖"}),C=i({chartParamsId:"CP_TOP_AND_NO_BOTTOM_PADDING",allPluginParamsIds:["PP_PIE_HALF_DONUT","PP_PIE_LABELS_HALF_ANGLE","PP_SERIES_LEGEND_ROUND"],description:"半圓甜甜圈圖"}),U=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"基本Grid參數"}),f=t({chartParamsId:"CP_BOTTOM_LONG_PADDING",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM"],description:"傾斜標籤"}),y=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:"圓角長條圖"}),W=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),j=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_BARS_THIN","PP_GRID_LEGEND_BOTTOM"],description:"細長條圖"}),v=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_WITH_LINE_LIST"],description:"基本Grid參數"}),X=t({chartParamsId:"CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"傾斜標籤"}),$=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"橫向圓角長條圖"}),z=t({chartParamsId:"CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",allPluginParamsIds:["PP_LINES_CURVE","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"弧線折線圖"}),Y=t({chartParamsId:"CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",allPluginParamsIds:["PP_DOTS_ONLY_SHOW_HIGHLIGHTED","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"折線圖及Highlight Group圓點"}),Z=u({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST"],description:"基本MultiGrid參數"});_.PRESET_BARS_HORIZONTAL_AND_ROUND=W,_.PRESET_BARS_HORIZONTAL_AND_THIN=v,_.PRESET_BARS_ROUND=F,_.PRESET_BARS_THIN=j,_.PRESET_BUBBLES_SCALING_BY_RADIUS=M,_.PRESET_GRID_BASIC=U,_.PRESET_GRID_HORIZONTAL=y,_.PRESET_GRID_ROTATE_AXIS_LABEL=f,_.PRESET_LINES_BASIC=V,_.PRESET_LINES_CURVE=z,_.PRESET_LINES_HIGHLIGHT_GROUP_DOTS=Y,_.PRESET_LINES_HORIZONTAL=$,_.PRESET_LINES_ROTATE_AXIS_LABEL=X,_.PRESET_MULTI_GRID_BASIC=Z,_.PRESET_PIE_DONUT=b,_.PRESET_PIE_HALF_DONUT=C,_.PRESET_PIE_WITH_INNER_LABELS=h,_.PRESET_SERIES_BASIC=H,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|
package/dist/src/index.d.ts
CHANGED
@@ -15,3 +15,4 @@ export declare const PRESET_LINES_ROTATE_AXIS_LABEL: import('@orbcharts/core').P
|
|
15
15
|
export declare const PRESET_LINES_HORIZONTAL: import('@orbcharts/core').PresetPartial<"grid">;
|
16
16
|
export declare const PRESET_LINES_CURVE: import('@orbcharts/core').PresetPartial<"grid">;
|
17
17
|
export declare const PRESET_LINES_HIGHLIGHT_GROUP_DOTS: import('@orbcharts/core').PresetPartial<"grid">;
|
18
|
+
export declare const PRESET_MULTI_GRID_BASIC: import('@orbcharts/core').PresetPartial<"multiGrid">;
|
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export * from './MultiGridLegend';
|
package/dist/src/types.d.ts
CHANGED
@@ -13,6 +13,9 @@ import * as relationshipDataFormatters from './relationshipDataFormatterFiles';
|
|
13
13
|
import * as relationshipPluginParams from './relationshipPluginParamsFiles';
|
14
14
|
import * as treeDataFormatters from './treeDataFormatterFiles';
|
15
15
|
import * as treePluginParams from './treePluginParamsFiles';
|
16
|
+
type DeepPartial<T> = Partial<{
|
17
|
+
[P in keyof T]: DeepPartial<T[P]>;
|
18
|
+
}>;
|
16
19
|
export interface ChartParamsFile {
|
17
20
|
id: string;
|
18
21
|
description: string;
|
@@ -29,7 +32,7 @@ export interface PluginParamsFile<PluginParams> {
|
|
29
32
|
chartType: ChartType;
|
30
33
|
pluginName: string;
|
31
34
|
description: string;
|
32
|
-
data:
|
35
|
+
data: DeepPartial<PluginParams>;
|
33
36
|
}
|
34
37
|
export interface PresetFile<T extends ChartType> {
|
35
38
|
chartParamsId?: keyof typeof chartParams;
|
@@ -37,3 +40,4 @@ export interface PresetFile<T extends ChartType> {
|
|
37
40
|
allPluginParamsIds?: T extends 'series' ? (keyof typeof seriesPluginParams)[] : T extends 'grid' ? (keyof typeof gridPluginParams)[] : T extends 'multiGrid' ? (keyof typeof multiGridPluginParams)[] : T extends 'multiValue' ? (keyof typeof multiValuePluginParams)[] : T extends 'relationship' ? (keyof typeof relationshipPluginParams)[] : T extends 'tree' ? (keyof typeof treePluginParams)[] : undefined;
|
38
41
|
description: string;
|
39
42
|
}
|
43
|
+
export {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orbcharts/presets-basic",
|
3
|
-
"version": "3.0.0-alpha.
|
3
|
+
"version": "3.0.0-alpha.5",
|
4
4
|
"description": "presets for OrbCharts",
|
5
5
|
"author": "Blue Planet Inc.",
|
6
6
|
"license": "Apache-2.0",
|
@@ -35,8 +35,8 @@
|
|
35
35
|
"vite-plugin-dts": "^3.7.3"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@orbcharts/core": "^3.0.0-alpha.
|
39
|
-
"@orbcharts/plugins-basic": "^3.0.0-alpha.
|
38
|
+
"@orbcharts/core": "^3.0.0-alpha.30",
|
39
|
+
"@orbcharts/plugins-basic": "^3.0.0-alpha.34",
|
40
40
|
"d3": "^7.8.5",
|
41
41
|
"rxjs": "^7.8.1"
|
42
42
|
}
|
package/src/index.ts
CHANGED
@@ -80,18 +80,18 @@ export const PRESET_BARS_HORIZONTAL_AND_THIN = createGridPreset({
|
|
80
80
|
// Lines - PRESET_LINES_[name]
|
81
81
|
export const PRESET_LINES_BASIC = createGridPreset({
|
82
82
|
chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
|
83
|
-
allPluginParamsIds: ['
|
83
|
+
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
84
84
|
description: '基本Grid參數'
|
85
85
|
})
|
86
86
|
export const PRESET_LINES_ROTATE_AXIS_LABEL = createGridPreset({
|
87
87
|
chartParamsId: 'CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT',
|
88
|
-
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', '
|
88
|
+
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
89
89
|
description: '傾斜標籤'
|
90
90
|
})
|
91
91
|
export const PRESET_LINES_HORIZONTAL = createGridPreset({
|
92
92
|
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT',
|
93
93
|
dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
94
|
-
allPluginParamsIds: ['
|
94
|
+
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
95
95
|
description: '橫向圓角長條圖'
|
96
96
|
})
|
97
97
|
// export const PRESET_LINES_WITH_SOLID_DOTS = createGridPreset({
|
@@ -114,7 +114,16 @@ export const PRESET_LINES_HIGHLIGHT_GROUP_DOTS = createGridPreset({
|
|
114
114
|
allPluginParamsIds: ['PP_DOTS_ONLY_SHOW_HIGHLIGHTED', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
115
115
|
description: '折線圖及Highlight Group圓點'
|
116
116
|
})
|
117
|
+
|
117
118
|
// -- multi-grid --
|
119
|
+
// 通用 - PRESET_MULTI_GRID_[name]
|
120
|
+
export const PRESET_MULTI_GRID_BASIC = createMultiGridPreset({
|
121
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
122
|
+
allPluginParamsIds: ['PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST'],
|
123
|
+
description: '基本MultiGrid參數'
|
124
|
+
})
|
125
|
+
// BarsAndLines - PRESET_BARS_AND_LINES_[name]
|
126
|
+
|
118
127
|
|
119
128
|
// -- multi-value --
|
120
129
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { GridLegendParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_GRID_LEGEND_BOTTOM: PluginParamsFile<GridLegendParams> = {
|
5
|
+
id: 'PP_GRID_LEGEND_BOTTOM',
|
6
|
+
chartType: 'multiGrid',
|
7
|
+
pluginName: 'MultiGridLegend',
|
8
|
+
description: '底部圖例',
|
9
|
+
data: {
|
10
|
+
position: 'bottom',
|
11
|
+
justify: 'center',
|
12
|
+
padding: 14,
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { MultiGridLegendParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST: PluginParamsFile<MultiGridLegendParams> = {
|
5
|
+
id: 'PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST',
|
6
|
+
chartType: 'multiGrid',
|
7
|
+
pluginName: 'MultiGridLegend',
|
8
|
+
description: '底部圖例及線條列點',
|
9
|
+
data: {
|
10
|
+
position: 'bottom',
|
11
|
+
justify: 'center',
|
12
|
+
padding: 14,
|
13
|
+
gridList: [
|
14
|
+
{
|
15
|
+
},
|
16
|
+
{
|
17
|
+
listRectHeight: 2,
|
18
|
+
}
|
19
|
+
]
|
20
|
+
}
|
21
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export * from './MultiGridLegend'
|
package/src/types.ts
CHANGED
@@ -17,6 +17,8 @@ import * as relationshipPluginParams from './relationshipPluginParamsFiles'
|
|
17
17
|
import * as treeDataFormatters from './treeDataFormatterFiles'
|
18
18
|
import * as treePluginParams from './treePluginParamsFiles'
|
19
19
|
|
20
|
+
type DeepPartial<T> = Partial<{ [P in keyof T]: DeepPartial<T[P]> }>
|
21
|
+
|
20
22
|
export interface ChartParamsFile {
|
21
23
|
id: string
|
22
24
|
description: string
|
@@ -35,7 +37,7 @@ export interface PluginParamsFile<PluginParams> {
|
|
35
37
|
chartType: ChartType
|
36
38
|
pluginName: string
|
37
39
|
description: string
|
38
|
-
data:
|
40
|
+
data: DeepPartial<PluginParams>
|
39
41
|
}
|
40
42
|
|
41
43
|
export interface PresetFile<T extends ChartType> {
|