@orbcharts/presets-basic 3.0.0-alpha.3 → 3.0.0-alpha.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,7 +56,7 @@ const l = {
56
56
  },
57
57
  highlightTarget: "group"
58
58
  }
59
- }, p = {
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
- }, N = {
71
+ }, S = {
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
- }, S = {
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
- }, g = {
93
+ }, G = {
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
- }, G = {
104
+ }, g = {
105
105
  id: "CP_RIGHT_PADDING",
106
106
  description: "間距右邊留空",
107
107
  data: {
@@ -118,15 +118,15 @@ const l = {
118
118
  CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT: l,
119
119
  CP_BOTTOM_LONG_PADDING: E,
120
120
  CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT: c,
121
- CP_BOTTOM_PADDING: N,
121
+ CP_BOTTOM_PADDING: S,
122
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({
123
+ CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT: N,
124
+ CP_LEFT_PADDING: p,
125
+ CP_RIGHT_PADDING: g,
126
+ CP_TOP_AND_NO_BOTTOM_PADDING: G
127
+ }, Symbol.toStringTag, { value: "Module" })), m = {}, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
128
128
  __proto__: null,
129
- temp: A
129
+ temp: m
130
130
  }, Symbol.toStringTag, { value: "Module" })), u = {
131
131
  id: "PP_BUBBLES_SCALING_BY_RADIUS",
132
132
  chartType: "series",
@@ -199,10 +199,10 @@ const l = {
199
199
  position: "left"
200
200
  }
201
201
  }
202
- }, y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
202
+ }, U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
203
203
  __proto__: null,
204
204
  DF_BOTTOM_VALUE_AXIS: C
205
- }, Symbol.toStringTag, { value: "Module" })), F = {
205
+ }, Symbol.toStringTag, { value: "Module" })), y = {
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
- }, U = {
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: F,
285
- PP_BARS_THIN: U,
284
+ PP_BARS_ROUND: y,
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,
@@ -313,9 +313,9 @@ const l = {
313
313
  }, Symbol.toStringTag, { value: "Module" })), i_ = {}, P_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
314
314
  __proto__: null,
315
315
  temp: i_
316
- }, Symbol.toStringTag, { value: "Module" })), o = {
317
- series: m,
318
- grid: y,
316
+ }, Symbol.toStringTag, { value: "Module" })), s = {
317
+ series: A,
318
+ grid: U,
319
319
  multiGrid: Y,
320
320
  multiValue: k,
321
321
  relationship: Q,
@@ -327,28 +327,28 @@ const l = {
327
327
  multiValue: J,
328
328
  relationship: t_,
329
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) => {
330
+ }, r = (t, e) => {
331
+ const T = e.chartParamsId ? L[e.chartParamsId].data : void 0, n = s[t][e.dataFormatterId] ? s[t][e.dataFormatterId].data : void 0, d = e.allPluginParamsIds ? e.allPluginParamsIds.reduce((o, i) => {
332
332
  if (P[t][i]) {
333
333
  const I = P[t][i].pluginName;
334
- r[I] = P[t][i].data;
334
+ o[I] = P[t][i].data;
335
335
  }
336
- return r;
336
+ return o;
337
337
  }, {}) : void 0;
338
338
  return {
339
- chartParams: n,
340
- dataFormatter: d,
341
- allPluginParams: T
339
+ chartParams: T,
340
+ dataFormatter: n,
341
+ allPluginParams: d
342
342
  };
343
- }, a = (t) => s("series", t), _ = (t) => s("grid", t), r_ = a({
343
+ }, a = (t) => r("series", t), _ = (t) => r("grid", t), r_ = (t) => r("multiGrid", t), o_ = a({
344
344
  // chartParamsId: 'CP_RIGHT_PADDING',
345
345
  allPluginParamsIds: [],
346
346
  description: "基本Series參數"
347
- }), o_ = a({
347
+ }), s_ = a({
348
348
  // chartParamsId: 'CP_RIGHT_PADDING',
349
349
  allPluginParamsIds: ["PP_BUBBLES_SCALING_BY_RADIUS", "PP_SERIES_LEGEND_ROUND"],
350
350
  description: "以半徑尺寸為比例的泡泡圖"
351
- }), s_ = a({
351
+ }), T_ = a({
352
352
  // chartParamsId: 'CP_RIGHT_PADDING',
353
353
  allPluginParamsIds: ["PP_PIE_LABELS_INNER", "PP_SERIES_LEGEND_ROUND"],
354
354
  description: "圓餅圖及內部資料標籤"
@@ -360,75 +360,80 @@ const l = {
360
360
  chartParamsId: "CP_TOP_AND_NO_BOTTOM_PADDING",
361
361
  allPluginParamsIds: ["PP_PIE_HALF_DONUT", "PP_PIE_LABELS_HALF_ANGLE", "PP_SERIES_LEGEND_ROUND"],
362
362
  description: "半圓甜甜圈圖"
363
- }), T_ = _({
363
+ }), I_ = _({
364
364
  chartParamsId: "CP_BOTTOM_PADDING",
365
365
  allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
366
366
  description: "基本Grid參數"
367
- }), I_ = _({
367
+ }), l_ = _({
368
368
  chartParamsId: "CP_BOTTOM_LONG_PADDING",
369
369
  allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "PP_GRID_LEGEND_BOTTOM"],
370
370
  description: "傾斜標籤"
371
- }), l_ = _({
371
+ }), O_ = _({
372
372
  chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
373
373
  dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
374
374
  allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
375
375
  description: "橫向圓角長條圖"
376
- }), O_ = _({
376
+ }), E_ = _({
377
377
  chartParamsId: "CP_BOTTOM_PADDING",
378
378
  allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
379
379
  description: "圓角長條圖"
380
- }), E_ = _({
380
+ }), c_ = _({
381
381
  chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
382
382
  dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
383
383
  allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
384
384
  description: "橫向圓角長條圖"
385
- }), c_ = _({
385
+ }), D_ = _({
386
386
  chartParamsId: "CP_BOTTOM_PADDING",
387
387
  allPluginParamsIds: ["PP_BARS_THIN", "PP_GRID_LEGEND_BOTTOM"],
388
388
  description: "細長條圖"
389
- }), D_ = _({
389
+ }), N_ = _({
390
390
  chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING",
391
391
  dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
392
392
  allPluginParamsIds: ["PP_BARS_ROUND", "PP_GRID_LEGEND_BOTTOM"],
393
393
  description: "橫向圓角長條圖"
394
- }), p_ = _({
394
+ }), S_ = _({
395
395
  chartParamsId: "CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",
396
- allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
396
+ allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
397
397
  description: "基本Grid參數"
398
- }), N_ = _({
398
+ }), p_ = _({
399
399
  chartParamsId: "CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT",
400
- allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "PP_GRID_LEGEND_BOTTOM"],
400
+ allPluginParamsIds: ["PP_GROUP_AXIS_ROTATE_LABEL", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
401
401
  description: "傾斜標籤"
402
- }), S_ = _({
402
+ }), G_ = _({
403
403
  chartParamsId: "CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT",
404
404
  dataFormatterId: "DF_BOTTOM_VALUE_AXIS",
405
- allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM"],
405
+ allPluginParamsIds: ["PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
406
406
  description: "橫向圓角長條圖"
407
407
  }), g_ = _({
408
408
  chartParamsId: "CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",
409
409
  allPluginParamsIds: ["PP_LINES_CURVE", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
410
410
  description: "弧線折線圖"
411
- }), G_ = _({
411
+ }), L_ = _({
412
412
  chartParamsId: "CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",
413
413
  allPluginParamsIds: ["PP_DOTS_ONLY_SHOW_HIGHLIGHTED", "PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],
414
414
  description: "折線圖及Highlight Group圓點"
415
+ }), m_ = r_({
416
+ // chartParamsId: 'CP_BOTTOM_PADDING',
417
+ allPluginParamsIds: [],
418
+ description: "基本MultiGrid參數"
415
419
  });
416
420
  export {
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,
421
+ c_ as PRESET_BARS_HORIZONTAL_AND_ROUND,
422
+ N_ as PRESET_BARS_HORIZONTAL_AND_THIN,
423
+ E_ as PRESET_BARS_ROUND,
424
+ D_ as PRESET_BARS_THIN,
425
+ s_ as PRESET_BUBBLES_SCALING_BY_RADIUS,
426
+ I_ as PRESET_GRID_BASIC,
427
+ O_ as PRESET_GRID_HORIZONTAL,
428
+ l_ as PRESET_GRID_ROTATE_AXIS_LABEL,
429
+ S_ as PRESET_LINES_BASIC,
426
430
  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,
431
+ L_ as PRESET_LINES_HIGHLIGHT_GROUP_DOTS,
432
+ G_ as PRESET_LINES_HORIZONTAL,
433
+ p_ as PRESET_LINES_ROTATE_AXIS_LABEL,
434
+ m_ as PRESET_MULTI_GRID_BASIC,
430
435
  n_ as PRESET_PIE_DONUT,
431
436
  d_ as PRESET_PIE_HALF_DONUT,
432
- s_ as PRESET_PIE_WITH_INNER_LABELS,
433
- r_ as PRESET_SERIES_BASIC
437
+ T_ as PRESET_PIE_WITH_INNER_LABELS,
438
+ o_ as PRESET_SERIES_BASIC
434
439
  };
@@ -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 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
+ (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"})),u=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),o={series:d,grid:N,multiGrid:G,multiValue:A,relationship:p,tree:m},T={series:S,grid:c,multiGrid:L,multiValue:R,relationship:g,tree:u},I=(P,e)=>{const w=e.chartParamsId?n[e.chartParamsId].data:void 0,k=o[P][e.dataFormatterId]?o[P][e.dataFormatterId].data:void 0,q=e.allPluginParamsIds?e.allPluginParamsIds.reduce((E,r)=>{if(T[P][r]){const J=T[P][r].pluginName;E[J]=T[P][r].data}return E},{}):void 0;return{chartParams:w,dataFormatter:k,allPluginParams:q}},i=P=>I("series",P),t=P=>I("grid",P),B=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:"傾斜標籤"}),F=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING",dataFormatterId:"DF_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),y=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=B({allPluginParamsIds:[],description:"基本MultiGrid參數"});_.PRESET_BARS_HORIZONTAL_AND_ROUND=W,_.PRESET_BARS_HORIZONTAL_AND_THIN=v,_.PRESET_BARS_ROUND=y,_.PRESET_BARS_THIN=j,_.PRESET_BUBBLES_SCALING_BY_RADIUS=M,_.PRESET_GRID_BASIC=U,_.PRESET_GRID_HORIZONTAL=F,_.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"})});
@@ -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">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbcharts/presets-basic",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.4",
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.26",
39
- "@orbcharts/plugins-basic": "^3.0.0-alpha.30",
38
+ "@orbcharts/core": "^3.0.0-alpha.27",
39
+ "@orbcharts/plugins-basic": "^3.0.0-alpha.31",
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: ['PP_GRID_LEGEND_BOTTOM'],
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', 'PP_GRID_LEGEND_BOTTOM'],
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: ['PP_GRID_LEGEND_BOTTOM'],
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: [],
123
+ description: '基本MultiGrid參數'
124
+ })
125
+ // BarsAndLines - PRESET_BARS_AND_LINES_[name]
126
+
118
127
 
119
128
  // -- multi-value --
120
129