@orbcharts/presets-basic 3.0.0-alpha.4 → 3.0.0-alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/orbcharts-presets-basic.es.js +327 -138
- package/dist/orbcharts-presets-basic.umd.js +1 -1
- package/dist/src/gridDataFormatterFiles/DF_GRID_2_SERIES_SLOT.d.ts +3 -0
- package/dist/src/gridDataFormatterFiles/DF_GRID_3_SERIES_SLOT.d.ts +3 -0
- package/dist/src/gridDataFormatterFiles/DF_GRID_4_SERIES_SLOT.d.ts +3 -0
- package/dist/src/gridDataFormatterFiles/DF_GRID_BOTTOM_VALUE_AXIS.d.ts +3 -0
- package/dist/src/gridDataFormatterFiles/index.d.ts +4 -1
- package/dist/src/index.d.ts +8 -0
- package/dist/src/multiGridDataFormatterFiles/DF_MULTI_GRID_2_GRID_SLOT.d.ts +3 -0
- package/dist/src/multiGridDataFormatterFiles/DF_MULTI_GRID_3_GRID_SLOT.d.ts +3 -0
- package/dist/src/multiGridDataFormatterFiles/DF_MULTI_GRID_4_GRID_SLOT.d.ts +3 -0
- package/dist/src/multiGridDataFormatterFiles/index.d.ts +3 -1
- 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 +6 -2
- package/package.json +3 -3
- package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING.ts +1 -1
- package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT.ts +1 -1
- package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.ts +1 -1
- package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT.ts +1 -1
- package/src/chartParamsFiles/CP_LEFT_PADDING.ts +2 -2
- package/src/chartParamsFiles/CP_TOP_AND_NO_BOTTOM_PADDING.ts +1 -1
- package/src/gridDataFormatterFiles/DF_GRID_2_SERIES_SLOT.ts +16 -0
- package/src/gridDataFormatterFiles/DF_GRID_3_SERIES_SLOT.ts +16 -0
- package/src/gridDataFormatterFiles/DF_GRID_4_SERIES_SLOT.ts +16 -0
- package/src/gridDataFormatterFiles/DF_GRID_BOTTOM_VALUE_AXIS.ts +23 -0
- package/src/gridDataFormatterFiles/index.ts +4 -1
- package/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.ts +2 -1
- package/src/index.ts +55 -8
- package/src/multiGridDataFormatterFiles/DF_MULTI_GRID_2_GRID_SLOT.ts +21 -0
- package/src/multiGridDataFormatterFiles/DF_MULTI_GRID_3_GRID_SLOT.ts +24 -0
- package/src/multiGridDataFormatterFiles/DF_MULTI_GRID_4_GRID_SLOT.ts +27 -0
- package/src/multiGridDataFormatterFiles/index.ts +3 -1
- 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 +5 -2
- package/tsconfig.dev.json +18 -0
- package/tsconfig.prod.json +18 -0
- package/dist/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.d.ts +0 -3
- package/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.ts +0 -16
@@ -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"})),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"})});
|
1
|
+
(function(_,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(_=typeof globalThis<"u"?globalThis:_||self,i(_["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:160}}},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:160},highlightTarget:"series"}},CP_BOTTOM_LONG_PADDING:{id:"CP_BOTTOM_LONG_PADDING",description:"間距下面加長留空",data:{padding:{top:60,right:60,bottom:160,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:160,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:160}}},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:120,right:120,bottom:0,left:60}}}},Symbol.toStringTag,{value:"Module"})),D=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}},S={id:"PP_PIE_HALF_DONUT",chartType:"series",pluginName:"Pie",description:"半圓甜甜圈圖",data:{innerRadius:.5,startAngle:-Math.PI/2,endAngle:Math.PI/2}},G={id:"PP_PIE_LABELS_HALF_ANGLE",chartType:"series",pluginName:"PieLabels",description:"半圓甜甜圈資料標籤",data:{startAngle:-Math.PI/2,endAngle:Math.PI/2}},R=Object.freeze(Object.defineProperty({__proto__:null,PP_BUBBLES_SCALING_BY_RADIUS:O,PP_PIE_DONUT:s,PP_PIE_HALF_DONUT:S,PP_PIE_LABELS_HALF_ANGLE:G,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"})),L=Object.freeze(Object.defineProperty({__proto__:null,DF_GRID_2_SERIES_SLOT:{id:"DF_GRID_2_SERIES_SLOT",chartType:"grid",description:"2個Series Slot",data:{grid:{seriesSlotIndexes:[0,1]},container:{rowAmount:1,columnAmount:2}}},DF_GRID_3_SERIES_SLOT:{id:"DF_GRID_3_SERIES_SLOT",chartType:"grid",description:"3個Series Slot",data:{grid:{seriesSlotIndexes:[0,1,2]},container:{rowAmount:1,columnAmount:3}}},DF_GRID_4_SERIES_SLOT:{id:"DF_GRID_4_SERIES_SLOT",chartType:"grid",description:"4個Series Slot",data:{grid:{seriesSlotIndexes:[0,1,2,3]},container:{rowAmount:2,columnAmount:2}}},DF_GRID_BOTTOM_VALUE_AXIS:{id:"DF_GRID_BOTTOM_VALUE_AXIS",chartType:"grid",description:"底部橫向資料圖軸",data:{grid:{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:{tickPadding:15,tickTextRotate:-30}},PP_LINES_CURVE:{id:"PP_LINES_CURVE",chartType:"grid",pluginName:"Lines",description:"圓弧折線圖",data:{lineCurve:"curveMonotoneX",lineWidth:3}}},Symbol.toStringTag,{value:"Module"})),c=Object.freeze(Object.defineProperty({__proto__:null,DF_MULTI_GRID_2_GRID_SLOT:{id:"DF_MULTI_GRID_2_GRID_SLOT",chartType:"multiGrid",description:"2個Grid Slot",data:{gridList:[{slotIndex:0},{slotIndex:1}],container:{rowAmount:1,columnAmount:2}}},DF_MULTI_GRID_3_GRID_SLOT:{id:"DF_MULTI_GRID_3_GRID_SLOT",chartType:"multiGrid",description:"3個Grid Slot",data:{gridList:[{slotIndex:0},{slotIndex:1},{slotIndex:2}],container:{rowAmount:1,columnAmount:3}}},DF_MULTI_GRID_4_GRID_SLOT:{id:"DF_MULTI_GRID_4_GRID_SLOT",chartType:"multiGrid",description:"4個Grid Slot",data:{gridList:[{slotIndex:0},{slotIndex:1},{slotIndex:2},{slotIndex:3}],container:{rowAmount:2,columnAmount:2}}}},Symbol.toStringTag,{value:"Module"})),N=Object.freeze(Object.defineProperty({__proto__:null,PP_MULTI_GRID_LEGEND_BOTTOM:{id:"PP_MULTI_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"})),A=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),m=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),g=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),p=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),B=Object.freeze(Object.defineProperty({__proto__:null,temp:{}},Symbol.toStringTag,{value:"Module"})),d={series:D,grid:L,multiGrid:c,multiValue:A,relationship:g,tree:u},a={series:R,grid:l,multiGrid:N,multiValue:m,relationship:p,tree:B},r=(I,T)=>{const t_=T.chartParamsId?n[T.chartParamsId].data:void 0,I_=d[I][T.dataFormatterId]?d[I][T.dataFormatterId].data:void 0,P_=T.allPluginParamsIds?T.allPluginParamsIds.reduce((o,E)=>{if(a[I][E]){const T_=a[I][E].pluginName;o[T_]=a[I][E].data}return o},{}):void 0;return{chartParams:t_,dataFormatter:I_,allPluginParams:P_}},P=I=>r("series",I),t=I=>r("grid",I),e=I=>r("multiGrid",I),M=P({allPluginParamsIds:[],description:"基本Series參數"}),H=P({allPluginParamsIds:["PP_SERIES_LEGEND_ROUND"],description:"基本泡泡圖"}),h=P({allPluginParamsIds:["PP_BUBBLES_SCALING_BY_RADIUS","PP_SERIES_LEGEND_ROUND"],description:"以半徑尺寸為比例的泡泡圖"}),U=P({allPluginParamsIds:["PP_SERIES_LEGEND_ROUND"],description:"基本圓餅圖"}),F=P({allPluginParamsIds:["PP_PIE_LABELS_INNER","PP_SERIES_LEGEND_ROUND"],description:"圓餅圖及內部資料標籤"}),C=P({allPluginParamsIds:["PP_PIE_DONUT","PP_SERIES_LEGEND_ROUND"],description:"甜甜圈圖"}),b=P({chartParamsId:"CP_TOP_AND_NO_BOTTOM_PADDING",allPluginParamsIds:["PP_PIE_HALF_DONUT","PP_PIE_LABELS_HALF_ANGLE","PP_SERIES_LEGEND_ROUND"],description:"半圓甜甜圈圖"}),y=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:"傾斜標籤"}),W=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING",dataFormatterId:"DF_GRID_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM"],description:"橫向圖"}),j=t({chartParamsId:"CP_BOTTOM_LONG_PADDING",dataFormatterId:"DF_GRID_2_SERIES_SLOT",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM"],description:"2組Series圖表"}),X=t({chartParamsId:"CP_BOTTOM_LONG_PADDING",dataFormatterId:"DF_GRID_3_SERIES_SLOT",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM","PP_GROUP_AXIS_ROTATE_LABEL"],description:"3組Series圖表"}),v=t({chartParamsId:"CP_BOTTOM_LONG_PADDING",dataFormatterId:"DF_GRID_4_SERIES_SLOT",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM"],description:"4組Series圖表"}),V=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"圓角長條圖"}),z=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING",dataFormatterId:"DF_GRID_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),$=t({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_BARS_THIN","PP_GRID_LEGEND_BOTTOM"],description:"細長條圖"}),Y=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING",dataFormatterId:"DF_GRID_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_BARS_ROUND","PP_GRID_LEGEND_BOTTOM"],description:"橫向圓角長條圖"}),w=t({chartParamsId:"CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"基本Grid參數"}),Z=t({chartParamsId:"CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT",allPluginParamsIds:["PP_GROUP_AXIS_ROTATE_LABEL","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"傾斜標籤"}),k=t({chartParamsId:"CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT",dataFormatterId:"DF_GRID_BOTTOM_VALUE_AXIS",allPluginParamsIds:["PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"橫向圓角長條圖"}),q=t({chartParamsId:"CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT",allPluginParamsIds:["PP_LINES_CURVE","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"弧線折線圖"}),J=t({chartParamsId:"CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT",allPluginParamsIds:["PP_DOTS_ONLY_SHOW_HIGHLIGHTED","PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST"],description:"折線圖及Highlight Group圓點"}),K=e({chartParamsId:"CP_BOTTOM_PADDING",allPluginParamsIds:["PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST"],description:"基本MultiGrid參數"}),Q=e({chartParamsId:"CP_BOTTOM_PADDING",dataFormatterId:"DF_MULTI_GRID_2_GRID_SLOT",allPluginParamsIds:["PP_MULTI_GRID_LEGEND_BOTTOM"],description:"2組Grid圖表"}),x=e({chartParamsId:"CP_BOTTOM_PADDING",dataFormatterId:"DF_MULTI_GRID_3_GRID_SLOT",allPluginParamsIds:["PP_MULTI_GRID_LEGEND_BOTTOM"],description:"3組Grid圖表"}),__=e({chartParamsId:"CP_BOTTOM_PADDING",dataFormatterId:"DF_MULTI_GRID_4_GRID_SLOT",allPluginParamsIds:["PP_MULTI_GRID_LEGEND_BOTTOM"],description:"4組Grid圖表"});_.PRESET_BARS_HORIZONTAL_AND_ROUND=z,_.PRESET_BARS_HORIZONTAL_AND_THIN=Y,_.PRESET_BARS_ROUND=V,_.PRESET_BARS_THIN=$,_.PRESET_BUBBLES_BASIC=H,_.PRESET_BUBBLES_SCALING_BY_RADIUS=h,_.PRESET_GRID_2_SERIES_SLOT=j,_.PRESET_GRID_3_SERIES_SLOT=X,_.PRESET_GRID_4_SERIES_SLOT=v,_.PRESET_GRID_BASIC=y,_.PRESET_GRID_HORIZONTAL=W,_.PRESET_GRID_ROTATE_AXIS_LABEL=f,_.PRESET_LINES_BASIC=w,_.PRESET_LINES_CURVE=q,_.PRESET_LINES_HIGHLIGHT_GROUP_DOTS=J,_.PRESET_LINES_HORIZONTAL=k,_.PRESET_LINES_ROTATE_AXIS_LABEL=Z,_.PRESET_MULTI_GRID_2_GRID_SLOT=Q,_.PRESET_MULTI_GRID_3_GRID_SLOT=x,_.PRESET_MULTI_GRID_4_GRID_SLOT=__,_.PRESET_MULTI_GRID_BASIC=K,_.PRESET_PIE_BASIC=U,_.PRESET_PIE_DONUT=C,_.PRESET_PIE_HALF_DONUT=b,_.PRESET_PIE_WITH_INNER_LABELS=F,_.PRESET_SERIES_BASIC=M,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|
@@ -1 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { DF_GRID_BOTTOM_VALUE_AXIS } from './DF_GRID_BOTTOM_VALUE_AXIS';
|
2
|
+
export { DF_GRID_2_SERIES_SLOT } from './DF_GRID_2_SERIES_SLOT';
|
3
|
+
export { DF_GRID_3_SERIES_SLOT } from './DF_GRID_3_SERIES_SLOT';
|
4
|
+
export { DF_GRID_4_SERIES_SLOT } from './DF_GRID_4_SERIES_SLOT';
|
package/dist/src/index.d.ts
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
export declare const PRESET_SERIES_BASIC: import('@orbcharts/core').PresetPartial<"series">;
|
2
|
+
export declare const PRESET_BUBBLES_BASIC: import('@orbcharts/core').PresetPartial<"series">;
|
2
3
|
export declare const PRESET_BUBBLES_SCALING_BY_RADIUS: import('@orbcharts/core').PresetPartial<"series">;
|
4
|
+
export declare const PRESET_PIE_BASIC: import('@orbcharts/core').PresetPartial<"series">;
|
3
5
|
export declare const PRESET_PIE_WITH_INNER_LABELS: import('@orbcharts/core').PresetPartial<"series">;
|
4
6
|
export declare const PRESET_PIE_DONUT: import('@orbcharts/core').PresetPartial<"series">;
|
5
7
|
export declare const PRESET_PIE_HALF_DONUT: import('@orbcharts/core').PresetPartial<"series">;
|
6
8
|
export declare const PRESET_GRID_BASIC: import('@orbcharts/core').PresetPartial<"grid">;
|
7
9
|
export declare const PRESET_GRID_ROTATE_AXIS_LABEL: import('@orbcharts/core').PresetPartial<"grid">;
|
8
10
|
export declare const PRESET_GRID_HORIZONTAL: import('@orbcharts/core').PresetPartial<"grid">;
|
11
|
+
export declare const PRESET_GRID_2_SERIES_SLOT: import('@orbcharts/core').PresetPartial<"grid">;
|
12
|
+
export declare const PRESET_GRID_3_SERIES_SLOT: import('@orbcharts/core').PresetPartial<"grid">;
|
13
|
+
export declare const PRESET_GRID_4_SERIES_SLOT: import('@orbcharts/core').PresetPartial<"grid">;
|
9
14
|
export declare const PRESET_BARS_ROUND: import('@orbcharts/core').PresetPartial<"grid">;
|
10
15
|
export declare const PRESET_BARS_HORIZONTAL_AND_ROUND: import('@orbcharts/core').PresetPartial<"grid">;
|
11
16
|
export declare const PRESET_BARS_THIN: import('@orbcharts/core').PresetPartial<"grid">;
|
@@ -16,3 +21,6 @@ export declare const PRESET_LINES_HORIZONTAL: import('@orbcharts/core').PresetPa
|
|
16
21
|
export declare const PRESET_LINES_CURVE: import('@orbcharts/core').PresetPartial<"grid">;
|
17
22
|
export declare const PRESET_LINES_HIGHLIGHT_GROUP_DOTS: import('@orbcharts/core').PresetPartial<"grid">;
|
18
23
|
export declare const PRESET_MULTI_GRID_BASIC: import('@orbcharts/core').PresetPartial<"multiGrid">;
|
24
|
+
export declare const PRESET_MULTI_GRID_2_GRID_SLOT: import('@orbcharts/core').PresetPartial<"multiGrid">;
|
25
|
+
export declare const PRESET_MULTI_GRID_3_GRID_SLOT: import('@orbcharts/core').PresetPartial<"multiGrid">;
|
26
|
+
export declare const PRESET_MULTI_GRID_4_GRID_SLOT: import('@orbcharts/core').PresetPartial<"multiGrid">;
|
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export * from './MultiGridLegend';
|
package/dist/src/types.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ChartParamsPartial, DataFormatterPartialTypeMap, ChartType } from '@orbcharts/core';
|
1
|
+
import { ChartParamsPartial, DataFormatterPartialTypeMap, ChartType } from '@orbcharts/core/src/index';
|
2
2
|
|
3
3
|
import * as chartParams from './chartParamsFiles';
|
4
4
|
import * as seriesDataFormatters from './seriesDataFormatterFiles';
|
@@ -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.6",
|
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.33",
|
39
|
+
"@orbcharts/plugins-basic": "^3.0.0-alpha.35",
|
40
40
|
"d3": "^7.8.5",
|
41
41
|
"rxjs": "^7.8.1"
|
42
42
|
}
|
@@ -2,13 +2,13 @@ import type { ChartParamsFile } from '../types'
|
|
2
2
|
|
3
3
|
export const CP_LEFT_PADDING: ChartParamsFile = {
|
4
4
|
id: 'CP_LEFT_PADDING',
|
5
|
-
description: '
|
5
|
+
description: '間距左邊留空',
|
6
6
|
data: {
|
7
7
|
padding: {
|
8
8
|
top: 60,
|
9
9
|
right: 60,
|
10
10
|
bottom: 60,
|
11
|
-
left:
|
11
|
+
left: 160
|
12
12
|
},
|
13
13
|
}
|
14
14
|
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { DataFormatterFile } from '../types'
|
2
|
+
|
3
|
+
export const DF_GRID_2_SERIES_SLOT: DataFormatterFile<'grid'> = {
|
4
|
+
id: 'DF_GRID_2_SERIES_SLOT',
|
5
|
+
chartType: 'grid',
|
6
|
+
description: '2個Series Slot',
|
7
|
+
data: {
|
8
|
+
grid: {
|
9
|
+
seriesSlotIndexes: [0, 1],
|
10
|
+
},
|
11
|
+
container: {
|
12
|
+
rowAmount: 1,
|
13
|
+
columnAmount: 2,
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { DataFormatterFile } from '../types'
|
2
|
+
|
3
|
+
export const DF_GRID_3_SERIES_SLOT: DataFormatterFile<'grid'> = {
|
4
|
+
id: 'DF_GRID_3_SERIES_SLOT',
|
5
|
+
chartType: 'grid',
|
6
|
+
description: '3個Series Slot',
|
7
|
+
data: {
|
8
|
+
grid: {
|
9
|
+
seriesSlotIndexes: [0, 1, 2],
|
10
|
+
},
|
11
|
+
container: {
|
12
|
+
rowAmount: 1,
|
13
|
+
columnAmount: 3,
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { DataFormatterFile } from '../types'
|
2
|
+
|
3
|
+
export const DF_GRID_4_SERIES_SLOT: DataFormatterFile<'grid'> = {
|
4
|
+
id: 'DF_GRID_4_SERIES_SLOT',
|
5
|
+
chartType: 'grid',
|
6
|
+
description: '4個Series Slot',
|
7
|
+
data: {
|
8
|
+
grid: {
|
9
|
+
seriesSlotIndexes: [0, 1, 2, 3],
|
10
|
+
},
|
11
|
+
container: {
|
12
|
+
rowAmount: 2,
|
13
|
+
columnAmount: 2,
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { DataFormatterFile } from '../types'
|
2
|
+
|
3
|
+
export const DF_GRID_BOTTOM_VALUE_AXIS: DataFormatterFile<'grid'> = {
|
4
|
+
id: 'DF_GRID_BOTTOM_VALUE_AXIS',
|
5
|
+
chartType: 'grid',
|
6
|
+
description: '底部橫向資料圖軸',
|
7
|
+
data: {
|
8
|
+
grid: {
|
9
|
+
valueAxis: {
|
10
|
+
position: 'bottom'
|
11
|
+
// position: 'top'
|
12
|
+
// position: 'left'
|
13
|
+
// position: 'right'
|
14
|
+
},
|
15
|
+
groupAxis: {
|
16
|
+
position: 'left'
|
17
|
+
// position: 'right'
|
18
|
+
// position: 'bottom'
|
19
|
+
// position: 'top'
|
20
|
+
},
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -1 +1,4 @@
|
|
1
|
-
export {
|
1
|
+
export { DF_GRID_BOTTOM_VALUE_AXIS } from './DF_GRID_BOTTOM_VALUE_AXIS'
|
2
|
+
export { DF_GRID_2_SERIES_SLOT } from './DF_GRID_2_SERIES_SLOT'
|
3
|
+
export { DF_GRID_3_SERIES_SLOT } from './DF_GRID_3_SERIES_SLOT'
|
4
|
+
export { DF_GRID_4_SERIES_SLOT } from './DF_GRID_4_SERIES_SLOT'
|
package/src/index.ts
CHANGED
@@ -14,12 +14,22 @@ export const PRESET_SERIES_BASIC = createSeriesPreset({
|
|
14
14
|
description: '基本Series參數'
|
15
15
|
})
|
16
16
|
// Bubbles - PRESET_BUBBLES_[name]
|
17
|
+
export const PRESET_BUBBLES_BASIC = createSeriesPreset({
|
18
|
+
// chartParamsId: 'CP_RIGHT_PADDING',
|
19
|
+
allPluginParamsIds: ['PP_SERIES_LEGEND_ROUND'],
|
20
|
+
description: '基本泡泡圖'
|
21
|
+
})
|
17
22
|
export const PRESET_BUBBLES_SCALING_BY_RADIUS = createSeriesPreset({
|
18
23
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
19
24
|
allPluginParamsIds: ['PP_BUBBLES_SCALING_BY_RADIUS', 'PP_SERIES_LEGEND_ROUND'],
|
20
25
|
description: '以半徑尺寸為比例的泡泡圖'
|
21
26
|
})
|
22
27
|
// Pie - PRESET_PIE_[name]
|
28
|
+
export const PRESET_PIE_BASIC = createSeriesPreset({
|
29
|
+
// chartParamsId: 'CP_RIGHT_PADDING',
|
30
|
+
allPluginParamsIds: ['PP_SERIES_LEGEND_ROUND'],
|
31
|
+
description: '基本圓餅圖'
|
32
|
+
})
|
23
33
|
export const PRESET_PIE_WITH_INNER_LABELS = createSeriesPreset({
|
24
34
|
// chartParamsId: 'CP_RIGHT_PADDING',
|
25
35
|
allPluginParamsIds: ['PP_PIE_LABELS_INNER', 'PP_SERIES_LEGEND_ROUND'],
|
@@ -50,9 +60,27 @@ export const PRESET_GRID_ROTATE_AXIS_LABEL = createGridPreset({
|
|
50
60
|
})
|
51
61
|
export const PRESET_GRID_HORIZONTAL = createGridPreset({
|
52
62
|
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
|
53
|
-
dataFormatterId: '
|
63
|
+
dataFormatterId: 'DF_GRID_BOTTOM_VALUE_AXIS',
|
54
64
|
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
|
55
|
-
description: '
|
65
|
+
description: '橫向圖'
|
66
|
+
})
|
67
|
+
export const PRESET_GRID_2_SERIES_SLOT = createGridPreset({
|
68
|
+
chartParamsId: 'CP_BOTTOM_LONG_PADDING',
|
69
|
+
dataFormatterId: 'DF_GRID_2_SERIES_SLOT',
|
70
|
+
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM'],
|
71
|
+
description: '2組Series圖表'
|
72
|
+
})
|
73
|
+
export const PRESET_GRID_3_SERIES_SLOT = createGridPreset({
|
74
|
+
chartParamsId: 'CP_BOTTOM_LONG_PADDING',
|
75
|
+
dataFormatterId: 'DF_GRID_3_SERIES_SLOT',
|
76
|
+
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM', 'PP_GROUP_AXIS_ROTATE_LABEL'],
|
77
|
+
description: '3組Series圖表'
|
78
|
+
})
|
79
|
+
export const PRESET_GRID_4_SERIES_SLOT = createGridPreset({
|
80
|
+
chartParamsId: 'CP_BOTTOM_LONG_PADDING',
|
81
|
+
dataFormatterId: 'DF_GRID_4_SERIES_SLOT',
|
82
|
+
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM'],
|
83
|
+
description: '4組Series圖表'
|
56
84
|
})
|
57
85
|
// Bars - PRESET_BARS_[name]
|
58
86
|
export const PRESET_BARS_ROUND = createGridPreset({
|
@@ -62,7 +90,7 @@ export const PRESET_BARS_ROUND = createGridPreset({
|
|
62
90
|
})
|
63
91
|
export const PRESET_BARS_HORIZONTAL_AND_ROUND = createGridPreset({
|
64
92
|
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
|
65
|
-
dataFormatterId: '
|
93
|
+
dataFormatterId: 'DF_GRID_BOTTOM_VALUE_AXIS',
|
66
94
|
allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
|
67
95
|
description: '橫向圓角長條圖'
|
68
96
|
})
|
@@ -73,7 +101,7 @@ export const PRESET_BARS_THIN = createGridPreset({
|
|
73
101
|
})
|
74
102
|
export const PRESET_BARS_HORIZONTAL_AND_THIN = createGridPreset({
|
75
103
|
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
|
76
|
-
dataFormatterId: '
|
104
|
+
dataFormatterId: 'DF_GRID_BOTTOM_VALUE_AXIS',
|
77
105
|
allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
|
78
106
|
description: '橫向圓角長條圖'
|
79
107
|
})
|
@@ -90,7 +118,7 @@ export const PRESET_LINES_ROTATE_AXIS_LABEL = createGridPreset({
|
|
90
118
|
})
|
91
119
|
export const PRESET_LINES_HORIZONTAL = createGridPreset({
|
92
120
|
chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT',
|
93
|
-
dataFormatterId: '
|
121
|
+
dataFormatterId: 'DF_GRID_BOTTOM_VALUE_AXIS',
|
94
122
|
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
95
123
|
description: '橫向圓角長條圖'
|
96
124
|
})
|
@@ -118,11 +146,30 @@ export const PRESET_LINES_HIGHLIGHT_GROUP_DOTS = createGridPreset({
|
|
118
146
|
// -- multi-grid --
|
119
147
|
// 通用 - PRESET_MULTI_GRID_[name]
|
120
148
|
export const PRESET_MULTI_GRID_BASIC = createMultiGridPreset({
|
121
|
-
|
122
|
-
allPluginParamsIds: [],
|
149
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
150
|
+
allPluginParamsIds: ['PP_MULTI_GRID_LEGEND_BOTTOM_WITH_RECT_AND_LINE_LIST'],
|
123
151
|
description: '基本MultiGrid參數'
|
124
152
|
})
|
125
|
-
|
153
|
+
export const PRESET_MULTI_GRID_2_GRID_SLOT = createMultiGridPreset({
|
154
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
155
|
+
dataFormatterId: 'DF_MULTI_GRID_2_GRID_SLOT',
|
156
|
+
allPluginParamsIds: ['PP_MULTI_GRID_LEGEND_BOTTOM'],
|
157
|
+
description: '2組Grid圖表'
|
158
|
+
})
|
159
|
+
export const PRESET_MULTI_GRID_3_GRID_SLOT = createMultiGridPreset({
|
160
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
161
|
+
dataFormatterId: 'DF_MULTI_GRID_3_GRID_SLOT',
|
162
|
+
allPluginParamsIds: ['PP_MULTI_GRID_LEGEND_BOTTOM'],
|
163
|
+
description: '3組Grid圖表'
|
164
|
+
})
|
165
|
+
export const PRESET_MULTI_GRID_4_GRID_SLOT = createMultiGridPreset({
|
166
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
167
|
+
dataFormatterId: 'DF_MULTI_GRID_4_GRID_SLOT',
|
168
|
+
allPluginParamsIds: ['PP_MULTI_GRID_LEGEND_BOTTOM'],
|
169
|
+
description: '4組Grid圖表'
|
170
|
+
})
|
171
|
+
// MultiBars, MultiLines - PRESET_BARS_AND_LINES_[name]
|
172
|
+
|
126
173
|
|
127
174
|
|
128
175
|
// -- multi-value --
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { DataFormatterFile } from '../types'
|
2
|
+
|
3
|
+
export const DF_MULTI_GRID_2_GRID_SLOT: DataFormatterFile<'multiGrid'> = {
|
4
|
+
id: 'DF_MULTI_GRID_2_GRID_SLOT',
|
5
|
+
chartType: 'multiGrid',
|
6
|
+
description: '2個Grid Slot',
|
7
|
+
data: {
|
8
|
+
gridList: [
|
9
|
+
{
|
10
|
+
slotIndex: 0
|
11
|
+
},
|
12
|
+
{
|
13
|
+
slotIndex: 1
|
14
|
+
}
|
15
|
+
],
|
16
|
+
container: {
|
17
|
+
rowAmount: 1,
|
18
|
+
columnAmount: 2,
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import type { DataFormatterFile } from '../types'
|
2
|
+
|
3
|
+
export const DF_MULTI_GRID_3_GRID_SLOT: DataFormatterFile<'multiGrid'> = {
|
4
|
+
id: 'DF_MULTI_GRID_3_GRID_SLOT',
|
5
|
+
chartType: 'multiGrid',
|
6
|
+
description: '3個Grid Slot',
|
7
|
+
data: {
|
8
|
+
gridList: [
|
9
|
+
{
|
10
|
+
slotIndex: 0
|
11
|
+
},
|
12
|
+
{
|
13
|
+
slotIndex: 1
|
14
|
+
},
|
15
|
+
{
|
16
|
+
slotIndex: 2
|
17
|
+
}
|
18
|
+
],
|
19
|
+
container: {
|
20
|
+
rowAmount: 1,
|
21
|
+
columnAmount: 3,
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { DataFormatterFile } from '../types'
|
2
|
+
|
3
|
+
export const DF_MULTI_GRID_4_GRID_SLOT: DataFormatterFile<'multiGrid'> = {
|
4
|
+
id: 'DF_MULTI_GRID_4_GRID_SLOT',
|
5
|
+
chartType: 'multiGrid',
|
6
|
+
description: '4個Grid Slot',
|
7
|
+
data: {
|
8
|
+
gridList: [
|
9
|
+
{
|
10
|
+
slotIndex: 0
|
11
|
+
},
|
12
|
+
{
|
13
|
+
slotIndex: 1
|
14
|
+
},
|
15
|
+
{
|
16
|
+
slotIndex: 2
|
17
|
+
},
|
18
|
+
{
|
19
|
+
slotIndex: 3
|
20
|
+
}
|
21
|
+
],
|
22
|
+
container: {
|
23
|
+
rowAmount: 2,
|
24
|
+
columnAmount: 2,
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { GridLegendParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_MULTI_GRID_LEGEND_BOTTOM: PluginParamsFile<GridLegendParams> = {
|
5
|
+
id: 'PP_MULTI_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
@@ -2,7 +2,8 @@ import type {
|
|
2
2
|
ChartParamsPartial,
|
3
3
|
DataFormatterPartialTypeMap,
|
4
4
|
ChartType,
|
5
|
-
Preset } from '@orbcharts/core'
|
5
|
+
Preset } from '@orbcharts/core/src/index'
|
6
|
+
// import * as core from '../../packages/orbcharts-core/src/index'
|
6
7
|
import * as chartParams from './chartParamsFiles'
|
7
8
|
import * as seriesDataFormatters from './seriesDataFormatterFiles'
|
8
9
|
import * as seriesPluginParams from './seriesPluginParamsFiles'
|
@@ -17,6 +18,8 @@ import * as relationshipPluginParams from './relationshipPluginParamsFiles'
|
|
17
18
|
import * as treeDataFormatters from './treeDataFormatterFiles'
|
18
19
|
import * as treePluginParams from './treePluginParamsFiles'
|
19
20
|
|
21
|
+
type DeepPartial<T> = Partial<{ [P in keyof T]: DeepPartial<T[P]> }>
|
22
|
+
|
20
23
|
export interface ChartParamsFile {
|
21
24
|
id: string
|
22
25
|
description: string
|
@@ -35,7 +38,7 @@ export interface PluginParamsFile<PluginParams> {
|
|
35
38
|
chartType: ChartType
|
36
39
|
pluginName: string
|
37
40
|
description: string
|
38
|
-
data:
|
41
|
+
data: DeepPartial<PluginParams>
|
39
42
|
}
|
40
43
|
|
41
44
|
export interface PresetFile<T extends ChartType> {
|