@orbcharts/presets-basic 3.0.0-alpha.1 → 3.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +200 -200
- package/dist/orbcharts-presets-basic.es.js +67 -57
- package/dist/orbcharts-presets-basic.umd.js +1 -1
- package/dist/src/index.d.ts +2 -0
- package/package.json +43 -43
- package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.ts +13 -13
- package/src/chartParamsFiles/CP_BOTTOM_PADDING.ts +13 -13
- package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT.ts +14 -14
- package/src/chartParamsFiles/CP_LEFT_PADDING.ts +13 -13
- package/src/chartParamsFiles/CP_RIGHT_PADDING.ts +13 -13
- package/src/chartParamsFiles/index.ts +4 -4
- package/src/createPreset.ts +87 -87
- package/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.ts +15 -15
- package/src/gridPluginParamsFiles/Bars/PP_BARS_ROUND.ts +14 -14
- package/src/gridPluginParamsFiles/Bars/PP_BARS_THIN.ts +14 -14
- package/src/gridPluginParamsFiles/Bars/index.ts +1 -1
- package/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.ts +14 -14
- package/src/gridPluginParamsFiles/Dots/PP_DOTS_SOLID.ts +14 -14
- package/src/gridPluginParamsFiles/Dots/index.ts +1 -1
- package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM.ts +13 -13
- package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST.ts +14 -14
- package/src/gridPluginParamsFiles/GridLegend/index.ts +1 -1
- package/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.ts +11 -11
- package/src/gridPluginParamsFiles/Lines/PP_LINES_CURVE.ts +12 -12
- package/src/gridPluginParamsFiles/index.ts +5 -5
- package/src/index.ts +114 -103
- package/src/seriesPluginParamsFiles/Bubbles/PP_BUBBLES_SCALING_BY_RADIUS.ts +11 -11
- package/src/seriesPluginParamsFiles/Pie/PP_PIE_DONUT.ts +12 -12
- package/src/seriesPluginParamsFiles/Pie/PP_PIE_HALF_DONUT.ts +14 -14
- package/src/seriesPluginParamsFiles/Pie/index.ts +1 -1
- package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_HALF_ANGLE.ts +13 -13
- package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_INNER.ts +13 -13
- package/src/seriesPluginParamsFiles/PieLabels/index.ts +1 -1
- package/src/seriesPluginParamsFiles/SeriesLegend/PP_SERIES_LEGEND_ROUND.ts +11 -11
- package/src/seriesPluginParamsFiles/index.ts +3 -3
- package/src/types.ts +58 -58
- package/tsconfig.json +13 -13
- package/vite.config.js +44 -44
@@ -1,4 +1,4 @@
|
|
1
|
-
const
|
1
|
+
const I = {
|
2
2
|
id: "CP_BOTTOM_LONG_PADDING",
|
3
3
|
description: "間距下面加長留空",
|
4
4
|
data: {
|
@@ -9,7 +9,7 @@ const T = {
|
|
9
9
|
left: 60
|
10
10
|
}
|
11
11
|
}
|
12
|
-
},
|
12
|
+
}, c = {
|
13
13
|
id: "CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",
|
14
14
|
description: "間距下面留空及highlight群組",
|
15
15
|
data: {
|
@@ -21,7 +21,7 @@ const T = {
|
|
21
21
|
},
|
22
22
|
highlightTarget: "group"
|
23
23
|
}
|
24
|
-
},
|
24
|
+
}, O = {
|
25
25
|
id: "CP_BOTTOM_PADDING",
|
26
26
|
description: "間距下面留空",
|
27
27
|
data: {
|
@@ -32,7 +32,7 @@ const T = {
|
|
32
32
|
left: 60
|
33
33
|
}
|
34
34
|
}
|
35
|
-
},
|
35
|
+
}, E = {
|
36
36
|
id: "CP_LEFT_PADDING",
|
37
37
|
description: "間距右邊留空",
|
38
38
|
data: {
|
@@ -43,7 +43,7 @@ const T = {
|
|
43
43
|
left: 180
|
44
44
|
}
|
45
45
|
}
|
46
|
-
},
|
46
|
+
}, p = {
|
47
47
|
id: "CP_RIGHT_PADDING",
|
48
48
|
description: "間距右邊留空",
|
49
49
|
data: {
|
@@ -54,17 +54,17 @@ const T = {
|
|
54
54
|
left: 60
|
55
55
|
}
|
56
56
|
}
|
57
|
-
},
|
57
|
+
}, D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
58
58
|
__proto__: null,
|
59
|
-
CP_BOTTOM_LONG_PADDING:
|
60
|
-
CP_BOTTOM_PADDING:
|
61
|
-
CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT:
|
62
|
-
CP_LEFT_PADDING:
|
63
|
-
CP_RIGHT_PADDING:
|
64
|
-
}, Symbol.toStringTag, { value: "Module" })), S = {},
|
59
|
+
CP_BOTTOM_LONG_PADDING: I,
|
60
|
+
CP_BOTTOM_PADDING: O,
|
61
|
+
CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT: c,
|
62
|
+
CP_LEFT_PADDING: E,
|
63
|
+
CP_RIGHT_PADDING: p
|
64
|
+
}, Symbol.toStringTag, { value: "Module" })), S = {}, g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
65
65
|
__proto__: null,
|
66
66
|
temp: S
|
67
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
67
|
+
}, Symbol.toStringTag, { value: "Module" })), u = {
|
68
68
|
id: "PP_BUBBLES_SCALING_BY_RADIUS",
|
69
69
|
chartType: "series",
|
70
70
|
pluginName: "Bubbles",
|
@@ -72,7 +72,7 @@ const T = {
|
|
72
72
|
data: {
|
73
73
|
bubbleScaleType: "radius"
|
74
74
|
}
|
75
|
-
},
|
75
|
+
}, N = {
|
76
76
|
id: "PP_PIE_DONUT",
|
77
77
|
chartType: "series",
|
78
78
|
pluginName: "Pie",
|
@@ -80,7 +80,7 @@ const T = {
|
|
80
80
|
data: {
|
81
81
|
innerRadius: 0.5
|
82
82
|
}
|
83
|
-
},
|
83
|
+
}, m = {
|
84
84
|
id: "PP_PIE_HALF_DONUT",
|
85
85
|
chartType: "series",
|
86
86
|
pluginName: "Pie",
|
@@ -118,9 +118,9 @@ const T = {
|
|
118
118
|
}
|
119
119
|
}, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
120
120
|
__proto__: null,
|
121
|
-
PP_BUBBLES_SCALING_BY_RADIUS:
|
122
|
-
PP_PIE_DONUT:
|
123
|
-
PP_PIE_HALF_DONUT:
|
121
|
+
PP_BUBBLES_SCALING_BY_RADIUS: u,
|
122
|
+
PP_PIE_DONUT: N,
|
123
|
+
PP_PIE_HALF_DONUT: m,
|
124
124
|
PP_PIE_LABELS_HALF_ANGLE: L,
|
125
125
|
PP_PIE_LABELS_INNER: G,
|
126
126
|
PP_SERIES_LEGEND_ROUND: R
|
@@ -150,7 +150,7 @@ const T = {
|
|
150
150
|
barGroupPadding: 10,
|
151
151
|
barRadius: !0
|
152
152
|
}
|
153
|
-
},
|
153
|
+
}, M = {
|
154
154
|
id: "PP_BARS_THIN",
|
155
155
|
chartType: "grid",
|
156
156
|
pluginName: "Bars",
|
@@ -160,7 +160,7 @@ const T = {
|
|
160
160
|
barPadding: 1,
|
161
161
|
barGroupPadding: 10
|
162
162
|
}
|
163
|
-
},
|
163
|
+
}, H = {
|
164
164
|
id: "PP_DOTS_ONLY_SHOW_HIGHLIGHTED",
|
165
165
|
chartType: "grid",
|
166
166
|
pluginName: "Dots",
|
@@ -170,7 +170,7 @@ const T = {
|
|
170
170
|
fillColorType: "series",
|
171
171
|
onlyShowHighlighted: !1
|
172
172
|
}
|
173
|
-
},
|
173
|
+
}, y = {
|
174
174
|
id: "PP_DOTS_SOLID",
|
175
175
|
chartType: "grid",
|
176
176
|
pluginName: "Dots",
|
@@ -221,9 +221,9 @@ const T = {
|
|
221
221
|
}, j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
222
222
|
__proto__: null,
|
223
223
|
PP_BARS_ROUND: h,
|
224
|
-
PP_BARS_THIN:
|
225
|
-
PP_DOTS_ONLY_SHOW_HIGHLIGHTED:
|
226
|
-
PP_DOTS_SOLID:
|
224
|
+
PP_BARS_THIN: M,
|
225
|
+
PP_DOTS_ONLY_SHOW_HIGHLIGHTED: H,
|
226
|
+
PP_DOTS_SOLID: y,
|
227
227
|
PP_GRID_LEGEND_BOTTOM: f,
|
228
228
|
PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST: U,
|
229
229
|
PP_GROUP_AXIS_ROTATE_LABEL: F,
|
@@ -240,12 +240,12 @@ const T = {
|
|
240
240
|
}, Symbol.toStringTag, { value: "Module" })), Y = {}, x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
241
241
|
__proto__: null,
|
242
242
|
temp: Y
|
243
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
244
|
-
__proto__: null,
|
245
|
-
temp: w
|
246
|
-
}, Symbol.toStringTag, { value: "Module" })), Z = {}, q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
243
|
+
}, Symbol.toStringTag, { value: "Module" })), Z = {}, w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
247
244
|
__proto__: null,
|
248
245
|
temp: Z
|
246
|
+
}, Symbol.toStringTag, { value: "Module" })), k = {}, q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
247
|
+
__proto__: null,
|
248
|
+
temp: k
|
249
249
|
}, Symbol.toStringTag, { value: "Module" })), J = {}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
250
250
|
__proto__: null,
|
251
251
|
temp: J
|
@@ -253,11 +253,11 @@ const T = {
|
|
253
253
|
__proto__: null,
|
254
254
|
temp: Q
|
255
255
|
}, Symbol.toStringTag, { value: "Module" })), o = {
|
256
|
-
series:
|
256
|
+
series: g,
|
257
257
|
grid: b,
|
258
258
|
multiGrid: W,
|
259
259
|
multiValue: $,
|
260
|
-
relationship:
|
260
|
+
relationship: w,
|
261
261
|
tree: K
|
262
262
|
}, r = {
|
263
263
|
series: A,
|
@@ -267,53 +267,56 @@ const T = {
|
|
267
267
|
relationship: q,
|
268
268
|
tree: tt
|
269
269
|
}, s = (t, _) => {
|
270
|
-
const n = _.chartParamsId ?
|
271
|
-
if (r[t][
|
272
|
-
const
|
273
|
-
P[
|
270
|
+
const n = _.chartParamsId ? D[_.chartParamsId].data : void 0, d = o[t][_.dataFormatterId] ? o[t][_.dataFormatterId].data : void 0, l = _.allPluginParamsIds ? _.allPluginParamsIds.reduce((P, i) => {
|
271
|
+
if (r[t][i]) {
|
272
|
+
const T = r[t][i].pluginName;
|
273
|
+
P[T] = r[t][i].data;
|
274
274
|
}
|
275
275
|
return P;
|
276
276
|
}, {}) : void 0;
|
277
277
|
return {
|
278
278
|
chartParams: n,
|
279
|
-
dataFormatter:
|
280
|
-
allPluginParams:
|
279
|
+
dataFormatter: d,
|
280
|
+
allPluginParams: l
|
281
281
|
};
|
282
|
-
},
|
282
|
+
}, a = (t) => s("series", t), e = (t) => s("grid", t), et = a({
|
283
283
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
284
284
|
allPluginParamsIds: [],
|
285
285
|
description: "基本Series參數"
|
286
|
-
}),
|
286
|
+
}), _t = a({
|
287
287
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
288
288
|
allPluginParamsIds: ["PP_BUBBLES_SCALING_BY_RADIUS", "PP_SERIES_LEGEND_ROUND"],
|
289
289
|
description: "以半徑尺寸為比例的泡泡圖"
|
290
|
-
}), at =
|
290
|
+
}), at = a({
|
291
291
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
292
292
|
allPluginParamsIds: ["PP_PIE_LABELS_INNER", "PP_SERIES_LEGEND_ROUND"],
|
293
293
|
description: "圓餅圖及內部資料標籤"
|
294
|
-
}),
|
294
|
+
}), it = a({
|
295
295
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
296
296
|
allPluginParamsIds: ["PP_PIE_DONUT", "PP_SERIES_LEGEND_ROUND"],
|
297
297
|
description: "甜甜圈圖"
|
298
|
-
}),
|
298
|
+
}), rt = a({
|
299
299
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
300
300
|
allPluginParamsIds: ["PP_PIE_HALF_DONUT", "PP_PIE_LABELS_HALF_ANGLE", "PP_SERIES_LEGEND_ROUND"],
|
301
301
|
description: "半圓甜甜圈圖"
|
302
|
-
}),
|
302
|
+
}), Pt = e({
|
303
303
|
chartParamsId: "CP_BOTTOM_LONG_PADDING",
|
304
304
|
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
|
305
305
|
description: "基本Grid參數"
|
306
|
-
}),
|
306
|
+
}), ot = e({
|
307
307
|
chartParamsId: "CP_BOTTOM_PADDING",
|
308
308
|
allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "PP_GRID_LEGEND_BOTTOM"],
|
309
309
|
description: "傾斜標籤"
|
310
|
-
}),
|
310
|
+
}), st = e({
|
311
|
+
chartParamsId: "CP_BOTTOM_PADDING",
|
312
|
+
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
313
|
+
allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
|
314
|
+
description: "橫向圓角長條圖"
|
315
|
+
}), nt = e({
|
311
316
|
chartParamsId: "CP_BOTTOM_PADDING",
|
312
317
|
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
313
318
|
description: "圓角長條圖"
|
314
|
-
})
|
315
|
-
console.log(et);
|
316
|
-
const nt = e({
|
319
|
+
}), dt = e({
|
317
320
|
chartParamsId: "CP_BOTTOM_PADDING",
|
318
321
|
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
319
322
|
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
@@ -322,7 +325,12 @@ const nt = e({
|
|
322
325
|
chartParamsId: "CP_BOTTOM_PADDING",
|
323
326
|
allPluginParamsIds: ["PP_BARS_THIN", "PP_GRID_LEGEND_BOTTOM"],
|
324
327
|
description: "細長條圖"
|
325
|
-
}),
|
328
|
+
}), Tt = e({
|
329
|
+
chartParamsId: "CP_BOTTOM_PADDING",
|
330
|
+
dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
|
331
|
+
allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
|
332
|
+
description: "橫向圓角長條圖"
|
333
|
+
}), It = e({
|
326
334
|
chartParamsId: "CP_BOTTOM_PADDING",
|
327
335
|
allPluginParamsIds: ["PP_LINES_CURVE", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
|
328
336
|
description: "弧線折線圖"
|
@@ -332,16 +340,18 @@ const nt = e({
|
|
332
340
|
description: "折線圖及Highlight Group圓點"
|
333
341
|
});
|
334
342
|
export {
|
335
|
-
|
336
|
-
|
343
|
+
dt as PRESET_BARS_HORIZONTAL_AND_ROUND,
|
344
|
+
Tt as PRESET_BARS_HORIZONTAL_AND_THIN,
|
345
|
+
nt as PRESET_BARS_ROUND,
|
337
346
|
lt as PRESET_BARS_THIN,
|
338
|
-
|
339
|
-
|
340
|
-
st as
|
341
|
-
|
347
|
+
_t as PRESET_BUBBLES_SCALING_BY_RADIUS,
|
348
|
+
Pt as PRESET_GRID_BASIC,
|
349
|
+
st as PRESET_GRID_HORIZONTAL,
|
350
|
+
ot as PRESET_GRID_ROTATE_AXIS_LABEL,
|
351
|
+
It as PRESET_LINES_CURVE,
|
342
352
|
ct as PRESET_LINES_HIGHLIGHT_GROUP_DOTS,
|
343
|
-
|
344
|
-
|
353
|
+
it as PRESET_PIE_DONUT,
|
354
|
+
rt as PRESET_PIE_HALF_DONUT,
|
345
355
|
at as PRESET_PIE_WITH_INNER_LABELS,
|
346
|
-
|
356
|
+
et as PRESET_SERIES_BASIC
|
347
357
|
};
|
@@ -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 d=Object.freeze(Object.defineProperty({__proto__:null,CP_BOTTOM_LONG_PADDING:{id:"CP_BOTTOM_LONG_PADDING",description:"間距下面加長留空",data:{padding:{top:60,right:60,bottom:180,left:60}}},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_LEFT_PADDING:{id:"CP_LEFT_PADDING",description:"間距右邊留空",data:{padding:{top:60,right:60,bottom:60,left:180}}},CP_RIGHT_PADDING:{id:"CP_RIGHT_PADDING",description:"間距右邊留空",data:{padding:{top:60,right:180,bottom:60,left:60}}}},Symbol.toStringTag,{value:"Module"})),l=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),I={id:"PP_BUBBLES_SCALING_BY_RADIUS",chartType:"series",pluginName:"Bubbles",description:"以半徑尺寸為比例的泡泡圖",data:{bubbleScaleType:"radius"}},E={id:"PP_PIE_DONUT",chartType:"series",pluginName:"Pie",description:"甜甜圈圖",data:{innerRadius:.5}},O={id:"PP_PIE_HALF_DONUT",chartType:"series",pluginName:"Pie",description:"半圓甜甜圈圖",data:{innerRadius:.5,startAngle:-Math.PI/2,endAngle:Math.PI/2}},S={id:"PP_PIE_LABELS_HALF_ANGLE",chartType:"series",pluginName:"PieLabels",description:"半圓甜甜圈資料標籤",data:{startAngle:-Math.PI/2,endAngle:Math.PI/2}},c=Object.freeze(Object.defineProperty({__proto__:null,PP_BUBBLES_SCALING_BY_RADIUS:I,PP_PIE_DONUT:E,PP_PIE_HALF_DONUT:O,PP_PIE_LABELS_HALF_ANGLE:S,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"})),D=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"})),N=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:{radius:3,fillColorType:"series",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"})),R=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),p=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),L=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),m=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),G=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),A=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),g=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),n={series:l,grid:D,multiGrid:R,multiValue:L,relationship:u,tree:A},r={series:c,grid:N,multiGrid:p,multiValue:m,relationship:G,tree:g},s=(e,P)=>{const $=P.chartParamsId?d[P.chartParamsId].data:void 0,z=n[e][P.dataFormatterId]?n[e][P.dataFormatterId].data:void 0,X=P.allPluginParamsIds?P.allPluginParamsIds.reduce((T,o)=>{if(r[e][o]){const Y=r[e][o].pluginName;T[Y]=r[e][o].data}return T},{}):void 0;return{chartParams:$,dataFormatter:z,allPluginParams:X}},i=e=>s("series",e),t=e=>s("grid",e),B=i({allPluginParamsIds:[],description:"基本Series參數"}),H=i({allPluginParamsIds:["PP_BUBBLES_SCALING_BY_RADIUS","PP_SERIES_LEGEND_ROUND"],description:"以半徑尺寸為比例的泡泡圖"}),b=i({allPluginParamsIds:["PP_PIE_LABELS_INNER","PP_SERIES_LEGEND_ROUND"],description:"圓餅圖及內部資料標籤"}),h=i({allPluginParamsIds:["PP_PIE_DONUT","PP_SERIES_LEGEND_ROUND"],description:"甜甜圈圖"}),M=i({allPluginParamsIds:["PP_PIE_HALF_DONUT","PP_PIE_LABELS_HALF_ANGLE","PP_SERIES_LEGEND_ROUND"],description:"半圓甜甜圈圖"}),U=t({chartParamsId:"CP_BOTTOM_LONG_PADDING",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"基本Grid參數"}),y=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM"],description:"傾斜標籤"}),f=t({chartParamsId:"CP_BOTTOM_PADDING",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),C=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"圓角長條圖"}),F=t({chartParamsId:"CP_BOTTOM_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_PADDING",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),W=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_LINES_CURVE","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"弧線折線圖"}),V=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=F,_.PRESET_BARS_HORIZONTAL_AND_THIN=v,_.PRESET_BARS_ROUND=C,_.PRESET_BARS_THIN=j,_.PRESET_BUBBLES_SCALING_BY_RADIUS=H,_.PRESET_GRID_BASIC=U,_.PRESET_GRID_HORIZONTAL=f,_.PRESET_GRID_ROTATE_AXIS_LABEL=y,_.PRESET_LINES_CURVE=W,_.PRESET_LINES_HIGHLIGHT_GROUP_DOTS=V,_.PRESET_PIE_DONUT=h,_.PRESET_PIE_HALF_DONUT=M,_.PRESET_PIE_WITH_INNER_LABELS=b,_.PRESET_SERIES_BASIC=B,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|
package/dist/src/index.d.ts
CHANGED
@@ -5,8 +5,10 @@ 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">;
|
11
13
|
export declare const PRESET_LINES_CURVE: import('@orbcharts/core').PresetPartial<"grid">;
|
12
14
|
export declare const PRESET_LINES_HIGHLIGHT_GROUP_DOTS: import('@orbcharts/core').PresetPartial<"grid">;
|
package/package.json
CHANGED
@@ -1,43 +1,43 @@
|
|
1
|
-
{
|
2
|
-
"name": "@orbcharts/presets-basic",
|
3
|
-
"version": "3.0.0-alpha.
|
4
|
-
"description": "presets for OrbCharts",
|
5
|
-
"author": "Blue Planet Inc.",
|
6
|
-
"license": "Apache-2.0",
|
7
|
-
"keywords": [
|
8
|
-
"d3",
|
9
|
-
"rxjs",
|
10
|
-
"svg",
|
11
|
-
"visualization",
|
12
|
-
"infographic",
|
13
|
-
"graph",
|
14
|
-
"chart"
|
15
|
-
],
|
16
|
-
"private": false,
|
17
|
-
"publishConfig": {
|
18
|
-
"access": "public",
|
19
|
-
"registry": "https://registry.npmjs.org/"
|
20
|
-
},
|
21
|
-
"files": [
|
22
|
-
"*"
|
23
|
-
],
|
24
|
-
"module": "./dist/orbcharts-presets-basic.es.js",
|
25
|
-
"types": "./dist/src/index.d.ts",
|
26
|
-
"scripts": {
|
27
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
28
|
-
"build": "vite build --mode release"
|
29
|
-
},
|
30
|
-
"devDependencies": {
|
31
|
-
"@types/d3": "^7.4.0",
|
32
|
-
"ts-loader": "^9.4.2",
|
33
|
-
"typescript": "^5.0.4",
|
34
|
-
"vite": "^5.3.5",
|
35
|
-
"vite-plugin-dts": "^3.7.3"
|
36
|
-
},
|
37
|
-
"dependencies": {
|
38
|
-
"@orbcharts/core": "^3.0.0-alpha.26",
|
39
|
-
"@orbcharts/plugins-basic": "^3.0.0-alpha.30",
|
40
|
-
"d3": "^7.8.5",
|
41
|
-
"rxjs": "^7.8.1"
|
42
|
-
}
|
43
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@orbcharts/presets-basic",
|
3
|
+
"version": "3.0.0-alpha.2",
|
4
|
+
"description": "presets for OrbCharts",
|
5
|
+
"author": "Blue Planet Inc.",
|
6
|
+
"license": "Apache-2.0",
|
7
|
+
"keywords": [
|
8
|
+
"d3",
|
9
|
+
"rxjs",
|
10
|
+
"svg",
|
11
|
+
"visualization",
|
12
|
+
"infographic",
|
13
|
+
"graph",
|
14
|
+
"chart"
|
15
|
+
],
|
16
|
+
"private": false,
|
17
|
+
"publishConfig": {
|
18
|
+
"access": "public",
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
20
|
+
},
|
21
|
+
"files": [
|
22
|
+
"*"
|
23
|
+
],
|
24
|
+
"module": "./dist/orbcharts-presets-basic.es.js",
|
25
|
+
"types": "./dist/src/index.d.ts",
|
26
|
+
"scripts": {
|
27
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
28
|
+
"build": "vite build --mode release"
|
29
|
+
},
|
30
|
+
"devDependencies": {
|
31
|
+
"@types/d3": "^7.4.0",
|
32
|
+
"ts-loader": "^9.4.2",
|
33
|
+
"typescript": "^5.0.4",
|
34
|
+
"vite": "^5.3.5",
|
35
|
+
"vite-plugin-dts": "^3.7.3"
|
36
|
+
},
|
37
|
+
"dependencies": {
|
38
|
+
"@orbcharts/core": "^3.0.0-alpha.26",
|
39
|
+
"@orbcharts/plugins-basic": "^3.0.0-alpha.30",
|
40
|
+
"d3": "^7.8.5",
|
41
|
+
"rxjs": "^7.8.1"
|
42
|
+
}
|
43
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import type { ChartParamsFile } from '../types'
|
2
|
-
|
3
|
-
export const CP_BOTTOM_LONG_PADDING: ChartParamsFile = {
|
4
|
-
id: 'CP_BOTTOM_LONG_PADDING',
|
5
|
-
description: '間距下面加長留空',
|
6
|
-
data: {
|
7
|
-
padding: {
|
8
|
-
top: 60,
|
9
|
-
right: 60,
|
10
|
-
bottom: 180,
|
11
|
-
left: 60
|
12
|
-
},
|
13
|
-
}
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_BOTTOM_LONG_PADDING: ChartParamsFile = {
|
4
|
+
id: 'CP_BOTTOM_LONG_PADDING',
|
5
|
+
description: '間距下面加長留空',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 60,
|
9
|
+
right: 60,
|
10
|
+
bottom: 180,
|
11
|
+
left: 60
|
12
|
+
},
|
13
|
+
}
|
14
14
|
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import type { ChartParamsFile } from '../types'
|
2
|
-
|
3
|
-
export const CP_BOTTOM_PADDING: ChartParamsFile = {
|
4
|
-
id: 'CP_BOTTOM_PADDING',
|
5
|
-
description: '間距下面留空',
|
6
|
-
data: {
|
7
|
-
padding: {
|
8
|
-
top: 60,
|
9
|
-
right: 60,
|
10
|
-
bottom: 120,
|
11
|
-
left: 60
|
12
|
-
},
|
13
|
-
}
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_BOTTOM_PADDING: ChartParamsFile = {
|
4
|
+
id: 'CP_BOTTOM_PADDING',
|
5
|
+
description: '間距下面留空',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 60,
|
9
|
+
right: 60,
|
10
|
+
bottom: 120,
|
11
|
+
left: 60
|
12
|
+
},
|
13
|
+
}
|
14
14
|
}
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import type { ChartParamsFile } from '../types'
|
2
|
-
|
3
|
-
export const CP_BOTTOM_PADDING_WITH_GROUP_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: 'group'
|
14
|
-
}
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_BOTTOM_PADDING_WITH_GROUP_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: 'group'
|
14
|
+
}
|
15
15
|
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import type { ChartParamsFile } from '../types'
|
2
|
-
|
3
|
-
export const CP_LEFT_PADDING: ChartParamsFile = {
|
4
|
-
id: 'CP_LEFT_PADDING',
|
5
|
-
description: '間距右邊留空',
|
6
|
-
data: {
|
7
|
-
padding: {
|
8
|
-
top: 60,
|
9
|
-
right: 60,
|
10
|
-
bottom: 60,
|
11
|
-
left: 180
|
12
|
-
},
|
13
|
-
}
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_LEFT_PADDING: ChartParamsFile = {
|
4
|
+
id: 'CP_LEFT_PADDING',
|
5
|
+
description: '間距右邊留空',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 60,
|
9
|
+
right: 60,
|
10
|
+
bottom: 60,
|
11
|
+
left: 180
|
12
|
+
},
|
13
|
+
}
|
14
14
|
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import type { ChartParamsFile } from '../types'
|
2
|
-
|
3
|
-
export const CP_RIGHT_PADDING: ChartParamsFile = {
|
4
|
-
id: 'CP_RIGHT_PADDING',
|
5
|
-
description: '間距右邊留空',
|
6
|
-
data: {
|
7
|
-
padding: {
|
8
|
-
top: 60,
|
9
|
-
right: 180,
|
10
|
-
bottom: 60,
|
11
|
-
left: 60
|
12
|
-
},
|
13
|
-
}
|
1
|
+
import type { ChartParamsFile } from '../types'
|
2
|
+
|
3
|
+
export const CP_RIGHT_PADDING: ChartParamsFile = {
|
4
|
+
id: 'CP_RIGHT_PADDING',
|
5
|
+
description: '間距右邊留空',
|
6
|
+
data: {
|
7
|
+
padding: {
|
8
|
+
top: 60,
|
9
|
+
right: 180,
|
10
|
+
bottom: 60,
|
11
|
+
left: 60
|
12
|
+
},
|
13
|
+
}
|
14
14
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { CP_BOTTOM_LONG_PADDING } from './CP_BOTTOM_LONG_PADDING'
|
2
|
-
export { CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT'
|
3
|
-
export { CP_BOTTOM_PADDING } from './CP_BOTTOM_PADDING'
|
4
|
-
export { CP_LEFT_PADDING } from './CP_LEFT_PADDING'
|
1
|
+
export { CP_BOTTOM_LONG_PADDING } from './CP_BOTTOM_LONG_PADDING'
|
2
|
+
export { CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT'
|
3
|
+
export { CP_BOTTOM_PADDING } from './CP_BOTTOM_PADDING'
|
4
|
+
export { CP_LEFT_PADDING } from './CP_LEFT_PADDING'
|
5
5
|
export { CP_RIGHT_PADDING } from './CP_RIGHT_PADDING'
|