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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-presets-basic.es.js +1334 -358
  3. package/dist/orbcharts-presets-basic.umd.js +1 -1
  4. package/dist/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.d.ts +4 -0
  5. package/dist/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.d.ts +4 -0
  6. package/dist/src/grid/PRESET_BARS_ROUND.d.ts +4 -0
  7. package/dist/src/grid/PRESET_BARS_THIN.d.ts +4 -0
  8. package/dist/src/grid/PRESET_GRID_BASIC.d.ts +4 -0
  9. package/dist/src/grid/PRESET_GRID_HORIZONTAL.d.ts +4 -0
  10. package/dist/src/grid/PRESET_GRID_PN_SCALE.d.ts +4 -0
  11. package/dist/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.d.ts +4 -0
  12. package/dist/src/grid/PRESET_GRID_SEPARATE_SERIES.d.ts +4 -0
  13. package/dist/src/grid/PRESET_LINES_BASIC.d.ts +4 -0
  14. package/dist/src/grid/PRESET_LINES_CURVE.d.ts +4 -0
  15. package/dist/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.d.ts +4 -0
  16. package/dist/src/grid/PRESET_LINES_HORIZONTAL.d.ts +4 -0
  17. package/dist/src/grid/PRESET_LINES_LOOSE_TICKS.d.ts +4 -0
  18. package/dist/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.d.ts +4 -0
  19. package/dist/src/grid/PRESET_LINES_WITH_SOLID_DOTS.d.ts +4 -0
  20. package/dist/src/grid/PRESET_LINE_AREAS_BASIC.d.ts +4 -0
  21. package/dist/src/grid/PRESET_LINE_AREAS_CURVE.d.ts +4 -0
  22. package/dist/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.d.ts +4 -0
  23. package/dist/src/grid/PRESET_LINE_AREAS_HORIZONTAL.d.ts +4 -0
  24. package/dist/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.d.ts +4 -0
  25. package/dist/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.d.ts +4 -0
  26. package/dist/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.d.ts +4 -0
  27. package/dist/src/grid/index.d.ts +23 -0
  28. package/dist/src/index.d.ts +4 -17
  29. package/dist/src/multiGrid/PRESET_MULTI_GRID_BASIC.d.ts +4 -0
  30. package/dist/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.d.ts +4 -0
  31. package/dist/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.d.ts +6 -0
  32. package/dist/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.d.ts +4 -0
  33. package/dist/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.d.ts +4 -0
  34. package/dist/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.d.ts +4 -0
  35. package/dist/src/multiGrid/index.d.ts +6 -0
  36. package/dist/src/params.d.ts +7 -0
  37. package/dist/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.d.ts +4 -0
  38. package/dist/src/series/PRESET_BUBBLES_SEPARATE_SERIES.d.ts +4 -0
  39. package/dist/src/series/PRESET_PIE_DONUT.d.ts +4 -0
  40. package/dist/src/series/PRESET_PIE_HALF_DONUT.d.ts +4 -0
  41. package/dist/src/series/PRESET_PIE_WITH_INNER_LABELS.d.ts +4 -0
  42. package/dist/src/series/PRESET_ROSE_SCALING_BY_RADIUS.d.ts +4 -0
  43. package/dist/src/series/PRESET_SERIES_BASIC.d.ts +4 -0
  44. package/dist/src/series/PRESET_SERIES_DESC.d.ts +4 -0
  45. package/dist/src/series/PRESET_SERIES_SEPARATE_SERIES.d.ts +4 -0
  46. package/dist/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.d.ts +4 -0
  47. package/dist/src/series/PRESET_SERIES_SUM_SERIES.d.ts +4 -0
  48. package/dist/src/series/index.d.ts +11 -0
  49. package/dist/src/tree/PRESET_TREE_BASIC.d.ts +4 -0
  50. package/dist/src/tree/index.d.ts +1 -0
  51. package/dist/src/types.d.ts +116 -37
  52. package/dist/vite.config.d.ts +1 -1
  53. package/package.json +43 -43
  54. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +62 -0
  55. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +59 -0
  56. package/src/grid/PRESET_BARS_ROUND.ts +46 -0
  57. package/src/grid/PRESET_BARS_THIN.ts +43 -0
  58. package/src/grid/PRESET_GRID_BASIC.ts +25 -0
  59. package/src/grid/PRESET_GRID_HORIZONTAL.ts +42 -0
  60. package/src/grid/PRESET_GRID_PN_SCALE.ts +33 -0
  61. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +33 -0
  62. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +38 -0
  63. package/src/grid/PRESET_LINES_BASIC.ts +44 -0
  64. package/src/grid/PRESET_LINES_CURVE.ts +47 -0
  65. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +46 -0
  66. package/src/grid/PRESET_LINES_HORIZONTAL.ts +60 -0
  67. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +46 -0
  68. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +49 -0
  69. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +48 -0
  70. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +54 -0
  71. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +59 -0
  72. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +58 -0
  73. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +58 -0
  74. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +56 -0
  75. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +59 -0
  76. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +61 -0
  77. package/src/grid/index.ts +23 -0
  78. package/src/index.ts +4 -124
  79. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +36 -0
  80. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +85 -0
  81. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +57 -0
  82. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +59 -0
  83. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +103 -0
  84. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +121 -0
  85. package/src/multiGrid/index.ts +6 -0
  86. package/src/params.ts +57 -0
  87. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +19 -0
  88. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +29 -0
  89. package/src/series/PRESET_PIE_DONUT.ts +23 -0
  90. package/src/series/PRESET_PIE_HALF_DONUT.ts +36 -0
  91. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +24 -0
  92. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +23 -0
  93. package/src/series/PRESET_SERIES_BASIC.ts +15 -0
  94. package/src/series/PRESET_SERIES_DESC.ts +16 -0
  95. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +15 -0
  96. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +16 -0
  97. package/src/series/PRESET_SERIES_SUM_SERIES.ts +15 -0
  98. package/src/series/index.ts +11 -0
  99. package/src/tree/PRESET_TREE_BASIC.ts +25 -0
  100. package/src/tree/index.ts +1 -0
  101. package/src/types.ts +242 -58
  102. package/tsconfig.base.json +14 -0
  103. package/tsconfig.json +2 -13
  104. package/vite.config.js +22 -44
  105. package/dist/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING.d.ts +0 -3
  106. package/dist/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +0 -3
  107. package/dist/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.d.ts +0 -3
  108. package/dist/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +0 -3
  109. package/dist/src/chartParamsFiles/CP_BOTTOM_PADDING.d.ts +0 -3
  110. package/dist/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT.d.ts +0 -3
  111. package/dist/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT.d.ts +0 -3
  112. package/dist/src/chartParamsFiles/CP_LEFT_PADDING.d.ts +0 -3
  113. package/dist/src/chartParamsFiles/CP_RIGHT_PADDING.d.ts +0 -3
  114. package/dist/src/chartParamsFiles/CP_TOP_AND_NO_BOTTOM_PADDING.d.ts +0 -3
  115. package/dist/src/chartParamsFiles/index.d.ts +0 -10
  116. package/dist/src/createPreset.d.ts +0 -9
  117. package/dist/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.d.ts +0 -3
  118. package/dist/src/gridDataFormatterFiles/index.d.ts +0 -1
  119. package/dist/src/gridPluginParamsFiles/Bars/PP_BARS_ROUND.d.ts +0 -4
  120. package/dist/src/gridPluginParamsFiles/Bars/PP_BARS_THIN.d.ts +0 -4
  121. package/dist/src/gridPluginParamsFiles/Bars/index.d.ts +0 -2
  122. package/dist/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.d.ts +0 -4
  123. package/dist/src/gridPluginParamsFiles/Dots/PP_DOTS_SOLID.d.ts +0 -4
  124. package/dist/src/gridPluginParamsFiles/Dots/index.d.ts +0 -2
  125. package/dist/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM.d.ts +0 -4
  126. package/dist/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST.d.ts +0 -4
  127. package/dist/src/gridPluginParamsFiles/GridLegend/index.d.ts +0 -2
  128. package/dist/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.d.ts +0 -4
  129. package/dist/src/gridPluginParamsFiles/GroupAxis/index.d.ts +0 -1
  130. package/dist/src/gridPluginParamsFiles/Lines/PP_LINES_CURVE.d.ts +0 -4
  131. package/dist/src/gridPluginParamsFiles/Lines/index.d.ts +0 -1
  132. package/dist/src/gridPluginParamsFiles/index.d.ts +0 -5
  133. package/dist/src/multiGridDataFormatterFiles/index.d.ts +0 -1
  134. package/dist/src/multiGridPluginParamsFiles/index.d.ts +0 -1
  135. package/dist/src/multiValueDataFormatterFiles/index.d.ts +0 -1
  136. package/dist/src/multiValuePluginParamsFiles/index.d.ts +0 -1
  137. package/dist/src/relationshipDataFormatterFiles/index.d.ts +0 -1
  138. package/dist/src/relationshipPluginParamsFiles/index.d.ts +0 -1
  139. package/dist/src/seriesDataFormatterFiles/index.d.ts +0 -1
  140. package/dist/src/seriesPluginParamsFiles/Bubbles/PP_BUBBLES_SCALING_BY_RADIUS.d.ts +0 -4
  141. package/dist/src/seriesPluginParamsFiles/Bubbles/index.d.ts +0 -1
  142. package/dist/src/seriesPluginParamsFiles/Pie/PP_PIE_BLACK_STROKE.d.ts +0 -0
  143. package/dist/src/seriesPluginParamsFiles/Pie/PP_PIE_DONUT.d.ts +0 -4
  144. package/dist/src/seriesPluginParamsFiles/Pie/PP_PIE_HALF_DONUT.d.ts +0 -4
  145. package/dist/src/seriesPluginParamsFiles/Pie/index.d.ts +0 -2
  146. package/dist/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_HALF_ANGLE.d.ts +0 -4
  147. package/dist/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_INNER.d.ts +0 -4
  148. package/dist/src/seriesPluginParamsFiles/PieLabels/index.d.ts +0 -2
  149. package/dist/src/seriesPluginParamsFiles/SeriesLegend/PP_SERIES_LEGEND_ROUND.d.ts +0 -4
  150. package/dist/src/seriesPluginParamsFiles/SeriesLegend/index.d.ts +0 -1
  151. package/dist/src/seriesPluginParamsFiles/index.d.ts +0 -4
  152. package/dist/src/treeDataFormatterFiles/index.d.ts +0 -1
  153. package/dist/src/treePluginParamsFiles/index.d.ts +0 -1
  154. package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING.ts +0 -14
  155. package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT.ts +0 -15
  156. package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.ts +0 -14
  157. package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT.ts +0 -15
  158. package/src/chartParamsFiles/CP_BOTTOM_PADDING.ts +0 -14
  159. package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT.ts +0 -15
  160. package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT.ts +0 -15
  161. package/src/chartParamsFiles/CP_LEFT_PADDING.ts +0 -14
  162. package/src/chartParamsFiles/CP_RIGHT_PADDING.ts +0 -14
  163. package/src/chartParamsFiles/CP_TOP_AND_NO_BOTTOM_PADDING.ts +0 -14
  164. package/src/chartParamsFiles/index.ts +0 -10
  165. package/src/createPreset.ts +0 -88
  166. package/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.ts +0 -16
  167. package/src/gridDataFormatterFiles/index.ts +0 -1
  168. package/src/gridPluginParamsFiles/Bars/PP_BARS_ROUND.ts +0 -15
  169. package/src/gridPluginParamsFiles/Bars/PP_BARS_THIN.ts +0 -14
  170. package/src/gridPluginParamsFiles/Bars/index.ts +0 -2
  171. package/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.ts +0 -12
  172. package/src/gridPluginParamsFiles/Dots/PP_DOTS_SOLID.ts +0 -14
  173. package/src/gridPluginParamsFiles/Dots/index.ts +0 -2
  174. package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM.ts +0 -14
  175. package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST.ts +0 -15
  176. package/src/gridPluginParamsFiles/GridLegend/index.ts +0 -2
  177. package/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.ts +0 -12
  178. package/src/gridPluginParamsFiles/GroupAxis/index.ts +0 -1
  179. package/src/gridPluginParamsFiles/Lines/PP_LINES_CURVE.ts +0 -13
  180. package/src/gridPluginParamsFiles/Lines/index.ts +0 -1
  181. package/src/gridPluginParamsFiles/index.ts +0 -6
  182. package/src/multiGridDataFormatterFiles/index.ts +0 -1
  183. package/src/multiGridPluginParamsFiles/index.ts +0 -1
  184. package/src/multiValueDataFormatterFiles/index.ts +0 -1
  185. package/src/multiValuePluginParamsFiles/index.ts +0 -1
  186. package/src/relationshipDataFormatterFiles/index.ts +0 -1
  187. package/src/relationshipPluginParamsFiles/index.ts +0 -1
  188. package/src/seriesDataFormatterFiles/index.ts +0 -1
  189. package/src/seriesPluginParamsFiles/Bubbles/PP_BUBBLES_SCALING_BY_RADIUS.ts +0 -12
  190. package/src/seriesPluginParamsFiles/Bubbles/index.ts +0 -1
  191. package/src/seriesPluginParamsFiles/Pie/PP_PIE_BLACK_STROKE.ts +0 -0
  192. package/src/seriesPluginParamsFiles/Pie/PP_PIE_DONUT.ts +0 -12
  193. package/src/seriesPluginParamsFiles/Pie/PP_PIE_HALF_DONUT.ts +0 -14
  194. package/src/seriesPluginParamsFiles/Pie/index.ts +0 -2
  195. package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_HALF_ANGLE.ts +0 -13
  196. package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_INNER.ts +0 -13
  197. package/src/seriesPluginParamsFiles/PieLabels/index.ts +0 -2
  198. package/src/seriesPluginParamsFiles/SeriesLegend/PP_SERIES_LEGEND_ROUND.ts +0 -12
  199. package/src/seriesPluginParamsFiles/SeriesLegend/index.ts +0 -1
  200. package/src/seriesPluginParamsFiles/index.ts +0 -4
  201. package/src/treeDataFormatterFiles/index.ts +0 -1
  202. package/src/treePluginParamsFiles/index.ts +0 -1
package/src/index.ts CHANGED
@@ -1,124 +1,4 @@
1
- import {
2
- createSeriesPreset,
3
- createGridPreset,
4
- createMultiGridPreset,
5
- createMultiValuePreset,
6
- createRelationshipPreset,
7
- createTreePreset } from './createPreset'
8
-
9
- // -- series --
10
- // 通用 - PRESET_SERIES_[name]
11
- export const PRESET_SERIES_BASIC = createSeriesPreset({
12
- // chartParamsId: 'CP_RIGHT_PADDING',
13
- allPluginParamsIds: [],
14
- description: '基本Series參數'
15
- })
16
- // Bubbles - PRESET_BUBBLES_[name]
17
- export const PRESET_BUBBLES_SCALING_BY_RADIUS = createSeriesPreset({
18
- // chartParamsId: 'CP_RIGHT_PADDING',
19
- allPluginParamsIds: ['PP_BUBBLES_SCALING_BY_RADIUS', 'PP_SERIES_LEGEND_ROUND'],
20
- description: '以半徑尺寸為比例的泡泡圖'
21
- })
22
- // Pie - PRESET_PIE_[name]
23
- export const PRESET_PIE_WITH_INNER_LABELS = createSeriesPreset({
24
- // chartParamsId: 'CP_RIGHT_PADDING',
25
- allPluginParamsIds: ['PP_PIE_LABELS_INNER', 'PP_SERIES_LEGEND_ROUND'],
26
- description: '圓餅圖及內部資料標籤'
27
- })
28
- export const PRESET_PIE_DONUT = createSeriesPreset({
29
- // chartParamsId: 'CP_RIGHT_PADDING',
30
- allPluginParamsIds: ['PP_PIE_DONUT', 'PP_SERIES_LEGEND_ROUND'],
31
- description: '甜甜圈圖'
32
- })
33
- export const PRESET_PIE_HALF_DONUT = createSeriesPreset({
34
- chartParamsId: 'CP_TOP_AND_NO_BOTTOM_PADDING',
35
- allPluginParamsIds: ['PP_PIE_HALF_DONUT', 'PP_PIE_LABELS_HALF_ANGLE', 'PP_SERIES_LEGEND_ROUND'],
36
- description: '半圓甜甜圈圖'
37
- })
38
-
39
- // -- grid --
40
- // 通用 - PRESET_GRID_[name]
41
- export const PRESET_GRID_BASIC = createGridPreset({
42
- chartParamsId: 'CP_BOTTOM_PADDING',
43
- allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
44
- description: '基本Grid參數'
45
- })
46
- export const PRESET_GRID_ROTATE_AXIS_LABEL = createGridPreset({
47
- chartParamsId: 'CP_BOTTOM_LONG_PADDING',
48
- allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM'],
49
- description: '傾斜標籤'
50
- })
51
- export const PRESET_GRID_HORIZONTAL = createGridPreset({
52
- chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
53
- dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
54
- allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
55
- description: '橫向圓角長條圖'
56
- })
57
- // Bars - PRESET_BARS_[name]
58
- export const PRESET_BARS_ROUND = createGridPreset({
59
- chartParamsId: 'CP_BOTTOM_PADDING',
60
- allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
61
- description: '圓角長條圖'
62
- })
63
- export const PRESET_BARS_HORIZONTAL_AND_ROUND = createGridPreset({
64
- chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
65
- dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
66
- allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
67
- description: '橫向圓角長條圖'
68
- })
69
- export const PRESET_BARS_THIN = createGridPreset({
70
- chartParamsId: 'CP_BOTTOM_PADDING',
71
- allPluginParamsIds: ['PP_BARS_THIN', 'PP_GRID_LEGEND_BOTTOM'],
72
- description: '細長條圖'
73
- })
74
- export const PRESET_BARS_HORIZONTAL_AND_THIN = createGridPreset({
75
- chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING',
76
- dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
77
- allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
78
- description: '橫向圓角長條圖'
79
- })
80
- // Lines - PRESET_LINES_[name]
81
- export const PRESET_LINES_BASIC = createGridPreset({
82
- chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
83
- allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
84
- description: '基本Grid參數'
85
- })
86
- export const PRESET_LINES_ROTATE_AXIS_LABEL = createGridPreset({
87
- chartParamsId: 'CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT',
88
- allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM'],
89
- description: '傾斜標籤'
90
- })
91
- export const PRESET_LINES_HORIZONTAL = createGridPreset({
92
- chartParamsId: 'CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT',
93
- dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
94
- allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
95
- description: '橫向圓角長條圖'
96
- })
97
- // export const PRESET_LINES_WITH_SOLID_DOTS = createGridPreset({
98
- // chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
99
- // allPluginParamsIds: ['PP_DOTS_SOLID', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
100
- // description: '折線圖及實心圓點'
101
- // })
102
- export const PRESET_LINES_CURVE = createGridPreset({
103
- chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
104
- allPluginParamsIds: ['PP_LINES_CURVE', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
105
- description: '弧線折線圖'
106
- })
107
- // export const PRESET_LINES_CURVES_WITH_SOLID_DOTS = createGridPreset({
108
- // chartParamsId: 'CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT',
109
- // allPluginParamsIds: ['PP_LINES_CURVE', 'PP_DOTS_SOLID', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
110
- // description: '弧線折線圖及實心圓點'
111
- // })
112
- export const PRESET_LINES_HIGHLIGHT_GROUP_DOTS = createGridPreset({
113
- chartParamsId: 'CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT',
114
- allPluginParamsIds: ['PP_DOTS_ONLY_SHOW_HIGHLIGHTED', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
115
- description: '折線圖及Highlight Group圓點'
116
- })
117
- // -- multi-grid --
118
-
119
- // -- multi-value --
120
-
121
- // -- relationship --
122
-
123
- // -- tree --
124
-
1
+ export * from './series'
2
+ export * from './grid'
3
+ export * from './multiGrid'
4
+ export * from './tree'
@@ -0,0 +1,36 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type {
3
+ PresetMultiGridLegendParams,
4
+ PresetNoneDataPluginParams
5
+ } from '../types'
6
+ import { ALL_PLUGIN_PARAMS_MULTI_GRID, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
7
+
8
+ export const PRESET_MULTI_GRID_BASIC: PresetPartial<'multiGrid', PresetMultiGridLegendParams & PresetNoneDataPluginParams> = {
9
+ name: 'PRESET_MULTI_GRID_BASIC',
10
+ description: '基本MultiGrid參數',
11
+ chartParams: {
12
+ padding: {
13
+ top: 60,
14
+ right: 60,
15
+ bottom: 120,
16
+ left: 60
17
+ },
18
+ highlightTarget: 'series'
19
+ },
20
+ allPluginParams: {
21
+ ...ALL_PLUGIN_PARAMS_MULTI_GRID,
22
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
23
+ MultiGridLegend: {
24
+ position: 'bottom',
25
+ justify: 'center',
26
+ padding: 14,
27
+ gridList: [
28
+ {
29
+ },
30
+ {
31
+ listRectHeight: 2,
32
+ }
33
+ ]
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,85 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type {
3
+ PresetMultiGridSepratedPluginParams,
4
+ PresetNoneDataPluginParams
5
+ } from '../types'
6
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
7
+
8
+ export const PRESET_MULTI_GRID_DIVERGING: PresetPartial<'multiGrid', PresetMultiGridSepratedPluginParams
9
+ & PresetNoneDataPluginParams> = {
10
+ name: 'PRESET_MULTI_GRID_DIVERGING',
11
+ description: '雙向折線圖',
12
+ chartParams: {
13
+ padding: {
14
+ top: 60,
15
+ right: 60,
16
+ bottom: 120,
17
+ left: 60
18
+ },
19
+ },
20
+ dataFormatter: {
21
+ gridList: [
22
+ // 第一個grid
23
+ {
24
+ groupAxis: {
25
+ position: 'right'
26
+ },
27
+ valueAxis: {
28
+ position: 'bottom'
29
+ },
30
+ },
31
+ // 第二個grid
32
+ {
33
+ groupAxis: {
34
+ position: 'left'
35
+ },
36
+ valueAxis: {
37
+ position: 'bottom'
38
+ },
39
+ }
40
+ ],
41
+ // 設定排版方式
42
+ container: {
43
+ gap: 200,
44
+ rowAmount: 1,
45
+ columnAmount: 2
46
+ },
47
+ separateGrid: true // 將兩個grid拆分
48
+ },
49
+ allPluginParams: {
50
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
51
+ MultiGroupAxis: {
52
+ tickPadding: 60, // 加長間距
53
+ gridIndexes: [0] // 只顯示一個
54
+ },
55
+ MultiValueAxis: {
56
+ gridIndexes: [0, 1]
57
+ },
58
+ MultiValueStackAxis: {
59
+ gridIndexes: [0, 1]
60
+ },
61
+ MultiBars: {
62
+ gridIndexes: [0, 1]
63
+ },
64
+ MultiBarStack: {
65
+ gridIndexes: [0, 1]
66
+ },
67
+ MultiBarsTriangle: {
68
+ gridIndexes: [0, 1]
69
+ },
70
+ MultiLines: {
71
+ gridIndexes: [0, 1]
72
+ },
73
+ MultiLineAreas: {
74
+ gridIndexes: [0, 1]
75
+ },
76
+ MultiDots: {
77
+ gridIndexes: [0, 1]
78
+ },
79
+ MultiGridLegend: {
80
+ position: 'bottom',
81
+ justify: 'center',
82
+ padding: 14,
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,57 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type {
3
+ PresetMultiGridPluginParams,
4
+ PresetNoneDataPluginParams
5
+ } from '../types'
6
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
7
+
8
+ type PresetMultiGridRoundPluginParams = Omit<PresetMultiGridPluginParams, 'MultiBarsTriangle'>
9
+
10
+ export const PRESET_MULTI_GRID_ROUND_STYLE: PresetPartial<'multiGrid', PresetMultiGridRoundPluginParams
11
+ & PresetNoneDataPluginParams> = {
12
+ name: 'PRESET_MULTI_GRID_ROUND_STYLE',
13
+ description: 'MultiGrid圓弧風格',
14
+ chartParams: {
15
+ padding: {
16
+ top: 60,
17
+ right: 60,
18
+ bottom: 120,
19
+ left: 60
20
+ },
21
+ highlightTarget: 'series'
22
+ },
23
+ allPluginParams: {
24
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
25
+ MultiBars: {
26
+ barWidth: 0,
27
+ barPadding: 1,
28
+ barGroupPadding: 10,
29
+ barRadius: true,
30
+ },
31
+ MultiBarStack: {},
32
+ MultiDots: {},
33
+ MultiGridLegend: {
34
+ position: 'bottom',
35
+ justify: 'center',
36
+ padding: 14,
37
+ gridList: [
38
+ {
39
+ listRectRadius: 7,
40
+ },
41
+ {
42
+ listRectHeight: 2,
43
+ }
44
+ ]
45
+ },
46
+ MultiGroupAxis: {},
47
+ MultiLineAreas: {},
48
+ MultiLines: {
49
+ lineCurve: 'curveMonotoneX',
50
+ lineWidth: 3
51
+ },
52
+ MultiValueAxis: {},
53
+ MultiValueStackAxis: {},
54
+ OverlappingValueAxes: {},
55
+ OverlappingValueStackAxes: {},
56
+ }
57
+ }
@@ -0,0 +1,59 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type {
3
+ PresetMultiGridSepratedPluginParams,
4
+ PresetNoneDataPluginParams
5
+ } from '../types'
6
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
7
+
8
+ export const PRESET_MULTI_GRID_SEPARATE_GRID: PresetPartial<'multiGrid', PresetMultiGridSepratedPluginParams
9
+ & PresetNoneDataPluginParams> = {
10
+ name: 'PRESET_MULTI_GRID_SEPARATE_GRID',
11
+ description: '2組Grid圖表',
12
+ chartParams: {
13
+ padding: {
14
+ top: 60,
15
+ right: 60,
16
+ bottom: 160,
17
+ left: 60
18
+ },
19
+ },
20
+ dataFormatter: {
21
+ separateGrid: true,
22
+ },
23
+ allPluginParams: {
24
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
25
+ MultiGroupAxis: {
26
+ tickTextRotate: -30,
27
+ gridIndexes: 'all'
28
+ },
29
+ MultiValueAxis: {
30
+ gridIndexes: 'all'
31
+ },
32
+ MultiValueStackAxis: {
33
+ gridIndexes: 'all'
34
+ },
35
+ MultiBars: {
36
+ gridIndexes: 'all'
37
+ },
38
+ MultiBarStack: {
39
+ gridIndexes: 'all'
40
+ },
41
+ MultiBarsTriangle: {
42
+ gridIndexes: 'all'
43
+ },
44
+ MultiLines: {
45
+ gridIndexes: 'all'
46
+ },
47
+ MultiLineAreas: {
48
+ gridIndexes: 'all'
49
+ },
50
+ MultiDots: {
51
+ gridIndexes: 'all'
52
+ },
53
+ MultiGridLegend: {
54
+ position: 'bottom',
55
+ justify: 'center',
56
+ padding: 14,
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,103 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type {
3
+ PresetMultiGroupAxisParams,
4
+ PresetMultiValueAxisParams,
5
+ PresetMultiValueStackAxisParams,
6
+ PresetMultiBarsParams,
7
+ PresetMultiBarStackParams,
8
+ PresetMultiBarsTriangleParams,
9
+ PresetMultiLinesParams,
10
+ PresetMultiLineAreasParams,
11
+ PresetMultiDotsParams,
12
+ PresetMultiGridLegendParams,
13
+ PresetNoneDataPluginParams
14
+ } from '../types'
15
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
16
+
17
+ export const PRESET_MULTI_LINES_SEPARATE_GRID: PresetPartial<'multiGrid', PresetMultiGroupAxisParams
18
+ & PresetMultiValueAxisParams
19
+ & PresetMultiValueStackAxisParams
20
+ & PresetMultiBarsParams
21
+ & PresetMultiBarStackParams
22
+ & PresetMultiBarsTriangleParams
23
+ & PresetMultiLinesParams
24
+ & PresetMultiLineAreasParams
25
+ & PresetMultiDotsParams
26
+ & PresetMultiGridLegendParams
27
+ & PresetNoneDataPluginParams> = {
28
+ name: 'PRESET_MULTI_LINES_SEPARATE_GRID',
29
+ description: '多組分開折線圖表',
30
+ chartParams: {
31
+ padding: {
32
+ top: 60,
33
+ right: 60,
34
+ bottom: 160,
35
+ left: 60
36
+ },
37
+ },
38
+ dataFormatter: {
39
+ separateGrid: true,
40
+ },
41
+ allPluginParams: {
42
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
43
+ MultiGroupAxis: {
44
+ tickTextRotate: -30,
45
+ gridIndexes: 'all'
46
+ },
47
+ MultiValueAxis: {
48
+ gridIndexes: 'all'
49
+ },
50
+ MultiValueStackAxis: {
51
+ gridIndexes: 'all'
52
+ },
53
+ MultiBars: {
54
+ gridIndexes: 'all'
55
+ },
56
+ MultiBarStack: {
57
+ gridIndexes: 'all'
58
+ },
59
+ MultiBarsTriangle: {
60
+ gridIndexes: 'all'
61
+ },
62
+ MultiLines: {
63
+ gridIndexes: 'all'
64
+ },
65
+ MultiLineAreas: {
66
+ gridIndexes: 'all'
67
+ },
68
+ MultiDots: {
69
+ gridIndexes: 'all'
70
+ },
71
+ MultiGridLegend: {
72
+ position: 'bottom',
73
+ justify: 'center',
74
+ padding: 14,
75
+ gridList: [
76
+ {
77
+ listRectHeight: 2,
78
+ },
79
+ {
80
+ listRectHeight: 2,
81
+ },
82
+ {
83
+ listRectHeight: 2,
84
+ },
85
+ {
86
+ listRectHeight: 2,
87
+ },
88
+ {
89
+ listRectHeight: 2,
90
+ },
91
+ {
92
+ listRectHeight: 2,
93
+ },
94
+ {
95
+ listRectHeight: 2,
96
+ },
97
+ {
98
+ listRectHeight: 2,
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ }
@@ -0,0 +1,121 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type {
3
+ PresetMultiGroupAxisParams,
4
+ PresetMultiValueAxisParams,
5
+ PresetMultiValueStackAxisParams,
6
+ PresetMultiBarsParams,
7
+ PresetMultiBarStackParams,
8
+ PresetMultiBarsTriangleParams,
9
+ PresetMultiLinesParams,
10
+ PresetMultiLineAreasParams,
11
+ PresetMultiDotsParams,
12
+ PresetMultiGridLegendParams,
13
+ PresetNoneDataPluginParams
14
+ } from '../types'
15
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
16
+
17
+ export const PRESET_MULTI_LINE_AREAS_SEPARATE_GRID: PresetPartial<'multiGrid', PresetMultiGroupAxisParams
18
+ & PresetMultiValueAxisParams
19
+ & PresetMultiValueStackAxisParams
20
+ & PresetMultiBarsParams
21
+ & PresetMultiBarStackParams
22
+ & PresetMultiBarsTriangleParams
23
+ & PresetMultiLinesParams
24
+ & PresetMultiLineAreasParams
25
+ & PresetMultiDotsParams
26
+ & PresetMultiGridLegendParams
27
+ & PresetNoneDataPluginParams> = {
28
+ name: 'PRESET_MULTI_LINE_AREAS_SEPARATE_GRID',
29
+ description: '2組區域圖表',
30
+ chartParams: {
31
+ padding: {
32
+ top: 60,
33
+ right: 60,
34
+ bottom: 160,
35
+ left: 60
36
+ },
37
+ },
38
+ dataFormatter: {
39
+ gridList: [
40
+ {
41
+ // slotIndex: 0
42
+ groupAxis: {
43
+ scalePadding: 0
44
+ }
45
+ },
46
+ {
47
+ // slotIndex: 1,
48
+ groupAxis: {
49
+ scalePadding: 0
50
+ }
51
+ }
52
+ ],
53
+ separateGrid: true,
54
+ // container: {
55
+ // rowAmount: 1,
56
+ // columnAmount: 2,
57
+ // }
58
+ },
59
+ allPluginParams: {
60
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
61
+ MultiGroupAxis: {
62
+ tickTextRotate: -30,
63
+ gridIndexes: 'all'
64
+ },
65
+ MultiValueAxis: {
66
+ gridIndexes: 'all'
67
+ },
68
+ MultiValueStackAxis: {
69
+ gridIndexes: 'all'
70
+ },
71
+ MultiBars: {
72
+ gridIndexes: 'all'
73
+ },
74
+ MultiBarStack: {
75
+ gridIndexes: 'all'
76
+ },
77
+ MultiBarsTriangle: {
78
+ gridIndexes: 'all'
79
+ },
80
+ MultiLines: {
81
+ gridIndexes: 'all'
82
+ },
83
+ MultiLineAreas: {
84
+ gridIndexes: 'all'
85
+ },
86
+ MultiDots: {
87
+ gridIndexes: 'all'
88
+ },
89
+ MultiGridLegend: {
90
+ position: 'bottom',
91
+ justify: 'center',
92
+ padding: 14,
93
+ gridList: [
94
+ {
95
+ listRectHeight: 2,
96
+ },
97
+ {
98
+ listRectHeight: 2,
99
+ },
100
+ {
101
+ listRectHeight: 2,
102
+ },
103
+ {
104
+ listRectHeight: 2,
105
+ },
106
+ {
107
+ listRectHeight: 2,
108
+ },
109
+ {
110
+ listRectHeight: 2,
111
+ },
112
+ {
113
+ listRectHeight: 2,
114
+ },
115
+ {
116
+ listRectHeight: 2,
117
+ }
118
+ ]
119
+ }
120
+ }
121
+ }
@@ -0,0 +1,6 @@
1
+ export { PRESET_MULTI_GRID_BASIC } from './PRESET_MULTI_GRID_BASIC'
2
+ export { PRESET_MULTI_GRID_DIVERGING } from './PRESET_MULTI_GRID_DIVERGING'
3
+ export { PRESET_MULTI_GRID_ROUND_STYLE } from './PRESET_MULTI_GRID_ROUND_STYLE'
4
+ export { PRESET_MULTI_GRID_SEPARATE_GRID } from './PRESET_MULTI_GRID_SEPARATE_GRID'
5
+ export { PRESET_MULTI_LINE_AREAS_SEPARATE_GRID } from './PRESET_MULTI_LINE_AREAS_SEPARATE_GRID'
6
+ export { PRESET_MULTI_LINES_SEPARATE_GRID } from './PRESET_MULTI_LINES_SEPARATE_GRID'
package/src/params.ts ADDED
@@ -0,0 +1,57 @@
1
+ import type {
2
+ PresetSeriesPluginParams,
3
+ PresetGridPluginParams,
4
+ PresetMultiGridPluginParams,
5
+ PresetTreePluginParams,
6
+ PresetNoneDataPluginParams
7
+ } from './types'
8
+
9
+ export const ALL_PLUGIN_PARAMS_SERIES: PresetSeriesPluginParams = {
10
+ Bubbles: {},
11
+ Pie: {},
12
+ PieEventTexts: {},
13
+ PieLabels: {},
14
+ Rose: {},
15
+ RoseLabels: {},
16
+ SeriesLegend: {},
17
+ }
18
+
19
+ export const ALL_PLUGIN_PARAMS_GRID: PresetGridPluginParams = {
20
+ Bars: {},
21
+ BarsPN: {},
22
+ BarStack: {},
23
+ BarsTriangle: {},
24
+ Dots: {},
25
+ GridLegend: {},
26
+ GroupAux: {},
27
+ GroupAxis: {},
28
+ LineAreas: {},
29
+ Lines: {},
30
+ ScalingArea: {},
31
+ ValueAxis: {},
32
+ ValueStackAxis: {},
33
+ }
34
+
35
+ export const ALL_PLUGIN_PARAMS_MULTI_GRID: PresetMultiGridPluginParams = {
36
+ MultiBars: {},
37
+ MultiBarStack: {},
38
+ MultiBarsTriangle: {},
39
+ MultiDots: {},
40
+ MultiGridLegend: {},
41
+ MultiGroupAxis: {},
42
+ MultiLineAreas: {},
43
+ MultiLines: {},
44
+ MultiValueAxis: {},
45
+ MultiValueStackAxis: {},
46
+ OverlappingValueAxes: {},
47
+ OverlappingValueStackAxes: {},
48
+ }
49
+
50
+ export const ALL_PLUGIN_PARAMS_TREE: PresetTreePluginParams = {
51
+ TreeLegend: {},
52
+ TreeMap: {},
53
+ }
54
+
55
+ export const ALL_PLUGIN_PARAMS_NONE_DATA: PresetNoneDataPluginParams = {
56
+ Tooltip: {},
57
+ }
@@ -0,0 +1,19 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetBubblesParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_BUBBLES_SCALING_BY_RADIUS: PresetPartial<'series', PresetBubblesParams
6
+ & PresetSeriesLegendParams
7
+ & PresetNoneDataPluginParams> = {
8
+ name: 'PRESET_BUBBLES_SCALING_BY_RADIUS',
9
+ description: '以半徑尺寸為比例的泡泡圖',
10
+ allPluginParams: {
11
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
12
+ Bubbles: {
13
+ arcScaleType: 'radius'
14
+ },
15
+ SeriesLegend: {
16
+ listRectRadius: 7 // 圓型圖例列點
17
+ }
18
+ },
19
+ }
@@ -0,0 +1,29 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetBubblesParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_BUBBLES_SEPARATE_SERIES: PresetPartial<'series', PresetBubblesParams
6
+ & PresetSeriesLegendParams
7
+ & PresetNoneDataPluginParams> = {
8
+ name: 'PRESET_BUBBLES_SEPARATE_SERIES',
9
+ description: '分開顯示Series泡泡',
10
+ chartParams: {
11
+ // 加長留空
12
+ padding: {
13
+ top: 160,
14
+ right: 160,
15
+ bottom: 160,
16
+ left: 160
17
+ },
18
+ },
19
+ dataFormatter: {
20
+ separateSeries: true,
21
+ },
22
+ allPluginParams: {
23
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
24
+ Bubbles: {},
25
+ SeriesLegend: {
26
+ listRectRadius: 7 // 圓型圖例列點
27
+ }
28
+ }
29
+ }