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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. package/dist/orbcharts-presets-basic.es.js +1334 -358
  2. package/dist/orbcharts-presets-basic.umd.js +1 -1
  3. package/dist/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.d.ts +4 -0
  4. package/dist/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.d.ts +4 -0
  5. package/dist/src/grid/PRESET_BARS_ROUND.d.ts +4 -0
  6. package/dist/src/grid/PRESET_BARS_THIN.d.ts +4 -0
  7. package/dist/src/grid/PRESET_GRID_BASIC.d.ts +4 -0
  8. package/dist/src/grid/PRESET_GRID_HORIZONTAL.d.ts +4 -0
  9. package/dist/src/grid/PRESET_GRID_PN_SCALE.d.ts +4 -0
  10. package/dist/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.d.ts +4 -0
  11. package/dist/src/grid/PRESET_GRID_SEPARATE_SERIES.d.ts +4 -0
  12. package/dist/src/grid/PRESET_LINES_BASIC.d.ts +4 -0
  13. package/dist/src/grid/PRESET_LINES_CURVE.d.ts +4 -0
  14. package/dist/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.d.ts +4 -0
  15. package/dist/src/grid/PRESET_LINES_HORIZONTAL.d.ts +4 -0
  16. package/dist/src/grid/PRESET_LINES_LOOSE_TICKS.d.ts +4 -0
  17. package/dist/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.d.ts +4 -0
  18. package/dist/src/grid/PRESET_LINES_WITH_SOLID_DOTS.d.ts +4 -0
  19. package/dist/src/grid/PRESET_LINE_AREAS_BASIC.d.ts +4 -0
  20. package/dist/src/grid/PRESET_LINE_AREAS_CURVE.d.ts +4 -0
  21. package/dist/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.d.ts +4 -0
  22. package/dist/src/grid/PRESET_LINE_AREAS_HORIZONTAL.d.ts +4 -0
  23. package/dist/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.d.ts +4 -0
  24. package/dist/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.d.ts +4 -0
  25. package/dist/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.d.ts +4 -0
  26. package/dist/src/grid/index.d.ts +23 -0
  27. package/dist/src/index.d.ts +4 -17
  28. package/dist/src/multiGrid/PRESET_MULTI_GRID_BASIC.d.ts +4 -0
  29. package/dist/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.d.ts +4 -0
  30. package/dist/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.d.ts +6 -0
  31. package/dist/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.d.ts +4 -0
  32. package/dist/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.d.ts +4 -0
  33. package/dist/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.d.ts +4 -0
  34. package/dist/src/multiGrid/index.d.ts +6 -0
  35. package/dist/src/params.d.ts +7 -0
  36. package/dist/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.d.ts +4 -0
  37. package/dist/src/series/PRESET_BUBBLES_SEPARATE_SERIES.d.ts +4 -0
  38. package/dist/src/series/PRESET_PIE_DONUT.d.ts +4 -0
  39. package/dist/src/series/PRESET_PIE_HALF_DONUT.d.ts +4 -0
  40. package/dist/src/series/PRESET_PIE_WITH_INNER_LABELS.d.ts +4 -0
  41. package/dist/src/series/PRESET_ROSE_SCALING_BY_RADIUS.d.ts +4 -0
  42. package/dist/src/series/PRESET_SERIES_BASIC.d.ts +4 -0
  43. package/dist/src/series/PRESET_SERIES_DESC.d.ts +4 -0
  44. package/dist/src/series/PRESET_SERIES_SEPARATE_SERIES.d.ts +4 -0
  45. package/dist/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.d.ts +4 -0
  46. package/dist/src/series/PRESET_SERIES_SUM_SERIES.d.ts +4 -0
  47. package/dist/src/series/index.d.ts +11 -0
  48. package/dist/src/tree/PRESET_TREE_BASIC.d.ts +4 -0
  49. package/dist/src/tree/index.d.ts +1 -0
  50. package/dist/src/types.d.ts +116 -37
  51. package/dist/vite.config.d.mts +2 -0
  52. package/package.json +6 -5
  53. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +62 -0
  54. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +59 -0
  55. package/src/grid/PRESET_BARS_ROUND.ts +46 -0
  56. package/src/grid/PRESET_BARS_THIN.ts +43 -0
  57. package/src/grid/PRESET_GRID_BASIC.ts +25 -0
  58. package/src/grid/PRESET_GRID_HORIZONTAL.ts +42 -0
  59. package/src/grid/PRESET_GRID_PN_SCALE.ts +33 -0
  60. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +33 -0
  61. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +38 -0
  62. package/src/grid/PRESET_LINES_BASIC.ts +44 -0
  63. package/src/grid/PRESET_LINES_CURVE.ts +47 -0
  64. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +46 -0
  65. package/src/grid/PRESET_LINES_HORIZONTAL.ts +60 -0
  66. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +46 -0
  67. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +49 -0
  68. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +48 -0
  69. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +54 -0
  70. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +59 -0
  71. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +58 -0
  72. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +58 -0
  73. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +56 -0
  74. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +59 -0
  75. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +61 -0
  76. package/src/grid/index.ts +23 -0
  77. package/src/index.ts +4 -124
  78. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +36 -0
  79. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +85 -0
  80. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +57 -0
  81. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +59 -0
  82. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +103 -0
  83. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +121 -0
  84. package/src/multiGrid/index.ts +6 -0
  85. package/src/params.ts +57 -0
  86. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +19 -0
  87. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +29 -0
  88. package/src/series/PRESET_PIE_DONUT.ts +23 -0
  89. package/src/series/PRESET_PIE_HALF_DONUT.ts +36 -0
  90. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +24 -0
  91. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +23 -0
  92. package/src/series/PRESET_SERIES_BASIC.ts +15 -0
  93. package/src/series/PRESET_SERIES_DESC.ts +16 -0
  94. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +15 -0
  95. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +16 -0
  96. package/src/series/PRESET_SERIES_SUM_SERIES.ts +15 -0
  97. package/src/series/index.ts +11 -0
  98. package/src/tree/PRESET_TREE_BASIC.ts +25 -0
  99. package/src/tree/index.ts +1 -0
  100. package/src/types.ts +240 -56
  101. package/tsconfig.base.json +14 -0
  102. package/tsconfig.json +5 -10
  103. package/tsconfig.prod.json +3 -0
  104. package/vite.config.mjs +42 -0
  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/dist/vite.config.d.ts +0 -2
  155. package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING.ts +0 -14
  156. package/src/chartParamsFiles/CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT.ts +0 -15
  157. package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.ts +0 -14
  158. package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT.ts +0 -15
  159. package/src/chartParamsFiles/CP_BOTTOM_PADDING.ts +0 -14
  160. package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT.ts +0 -15
  161. package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT.ts +0 -15
  162. package/src/chartParamsFiles/CP_LEFT_PADDING.ts +0 -14
  163. package/src/chartParamsFiles/CP_RIGHT_PADDING.ts +0 -14
  164. package/src/chartParamsFiles/CP_TOP_AND_NO_BOTTOM_PADDING.ts +0 -14
  165. package/src/chartParamsFiles/index.ts +0 -10
  166. package/src/createPreset.ts +0 -88
  167. package/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.ts +0 -16
  168. package/src/gridDataFormatterFiles/index.ts +0 -1
  169. package/src/gridPluginParamsFiles/Bars/PP_BARS_ROUND.ts +0 -15
  170. package/src/gridPluginParamsFiles/Bars/PP_BARS_THIN.ts +0 -14
  171. package/src/gridPluginParamsFiles/Bars/index.ts +0 -2
  172. package/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.ts +0 -12
  173. package/src/gridPluginParamsFiles/Dots/PP_DOTS_SOLID.ts +0 -14
  174. package/src/gridPluginParamsFiles/Dots/index.ts +0 -2
  175. package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM.ts +0 -14
  176. package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST.ts +0 -15
  177. package/src/gridPluginParamsFiles/GridLegend/index.ts +0 -2
  178. package/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.ts +0 -12
  179. package/src/gridPluginParamsFiles/GroupAxis/index.ts +0 -1
  180. package/src/gridPluginParamsFiles/Lines/PP_LINES_CURVE.ts +0 -13
  181. package/src/gridPluginParamsFiles/Lines/index.ts +0 -1
  182. package/src/gridPluginParamsFiles/index.ts +0 -6
  183. package/src/multiGridDataFormatterFiles/index.ts +0 -1
  184. package/src/multiGridPluginParamsFiles/index.ts +0 -1
  185. package/src/multiValueDataFormatterFiles/index.ts +0 -1
  186. package/src/multiValuePluginParamsFiles/index.ts +0 -1
  187. package/src/relationshipDataFormatterFiles/index.ts +0 -1
  188. package/src/relationshipPluginParamsFiles/index.ts +0 -1
  189. package/src/seriesDataFormatterFiles/index.ts +0 -1
  190. package/src/seriesPluginParamsFiles/Bubbles/PP_BUBBLES_SCALING_BY_RADIUS.ts +0 -12
  191. package/src/seriesPluginParamsFiles/Bubbles/index.ts +0 -1
  192. package/src/seriesPluginParamsFiles/Pie/PP_PIE_BLACK_STROKE.ts +0 -0
  193. package/src/seriesPluginParamsFiles/Pie/PP_PIE_DONUT.ts +0 -12
  194. package/src/seriesPluginParamsFiles/Pie/PP_PIE_HALF_DONUT.ts +0 -14
  195. package/src/seriesPluginParamsFiles/Pie/index.ts +0 -2
  196. package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_HALF_ANGLE.ts +0 -13
  197. package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_INNER.ts +0 -13
  198. package/src/seriesPluginParamsFiles/PieLabels/index.ts +0 -2
  199. package/src/seriesPluginParamsFiles/SeriesLegend/PP_SERIES_LEGEND_ROUND.ts +0 -12
  200. package/src/seriesPluginParamsFiles/SeriesLegend/index.ts +0 -1
  201. package/src/seriesPluginParamsFiles/index.ts +0 -4
  202. package/src/treeDataFormatterFiles/index.ts +0 -1
  203. package/src/treePluginParamsFiles/index.ts +0 -1
  204. package/vite.config.js +0 -45
@@ -0,0 +1,15 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SERIES_SEPARATE_SERIES: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_SERIES_SEPARATE_SERIES',
7
+ description: '分開顯示Series',
8
+ dataFormatter: {
9
+ separateSeries: true,
10
+ },
11
+ allPluginParams: {
12
+ ...ALL_PLUGIN_PARAMS_SERIES,
13
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
+ }
15
+ }
@@ -0,0 +1,16 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES',
7
+ description: '分開顯示Series並合併Series資料',
8
+ dataFormatter: {
9
+ separateSeries: true,
10
+ sumSeries: true,
11
+ },
12
+ allPluginParams: {
13
+ ...ALL_PLUGIN_PARAMS_SERIES,
14
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
15
+ }
16
+ }
@@ -0,0 +1,15 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SERIES_SUM_SERIES: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_SERIES_SUM_SERIES',
7
+ description: '合併Series資料',
8
+ dataFormatter: {
9
+ sumSeries: true
10
+ },
11
+ allPluginParams: {
12
+ ...ALL_PLUGIN_PARAMS_SERIES,
13
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
+ }
15
+ }
@@ -0,0 +1,11 @@
1
+ export { PRESET_BUBBLES_SCALING_BY_RADIUS } from './PRESET_BUBBLES_SCALING_BY_RADIUS'
2
+ export { PRESET_BUBBLES_SEPARATE_SERIES } from './PRESET_BUBBLES_SEPARATE_SERIES'
3
+ export { PRESET_PIE_DONUT } from './PRESET_PIE_DONUT'
4
+ export { PRESET_PIE_HALF_DONUT } from './PRESET_PIE_HALF_DONUT'
5
+ export { PRESET_PIE_WITH_INNER_LABELS } from './PRESET_PIE_WITH_INNER_LABELS'
6
+ export { PRESET_ROSE_SCALING_BY_RADIUS } from './PRESET_ROSE_SCALING_BY_RADIUS'
7
+ export { PRESET_SERIES_BASIC } from './PRESET_SERIES_BASIC'
8
+ export { PRESET_SERIES_DESC } from './PRESET_SERIES_DESC'
9
+ export { PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES } from './PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES'
10
+ export { PRESET_SERIES_SEPARATE_SERIES } from './PRESET_SERIES_SEPARATE_SERIES'
11
+ export { PRESET_SERIES_SUM_SERIES } from './PRESET_SERIES_SUM_SERIES'
@@ -0,0 +1,25 @@
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetTreeLegendParams, PresetTreeMapParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_TREE_BASIC: PresetPartial<'tree', PresetTreeLegendParams & PresetTreeMapParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_TREE_BASIC',
7
+ description: '基本Tree參數',
8
+ chartParams: {
9
+ padding: {
10
+ top: 40,
11
+ right: 40,
12
+ bottom: 60,
13
+ left: 40
14
+ },
15
+ },
16
+ allPluginParams: {
17
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
18
+ TreeMap: {},
19
+ TreeLegend: {
20
+ position: 'bottom',
21
+ justify: 'center',
22
+ padding: 14,
23
+ }
24
+ }
25
+ }
@@ -0,0 +1 @@
1
+ export { PRESET_TREE_BASIC } from './PRESET_TREE_BASIC'
package/src/types.ts CHANGED
@@ -1,58 +1,242 @@
1
1
  import type {
2
- ChartParamsPartial,
3
- DataFormatterPartialTypeMap,
4
- ChartType,
5
- Preset } from '@orbcharts/core'
6
- import * as chartParams from './chartParamsFiles'
7
- import * as seriesDataFormatters from './seriesDataFormatterFiles'
8
- import * as seriesPluginParams from './seriesPluginParamsFiles'
9
- import * as gridDataFormatters from './gridDataFormatterFiles'
10
- import * as gridPluginParams from './gridPluginParamsFiles'
11
- import * as multiGridDataFormatters from './multiGridDataFormatterFiles'
12
- import * as multiGridPluginParams from './multiGridPluginParamsFiles'
13
- import * as multiValueDataFormatters from './multiValueDataFormatterFiles'
14
- import * as multiValuePluginParams from './multiValuePluginParamsFiles'
15
- import * as relationshipDataFormatters from './relationshipDataFormatterFiles'
16
- import * as relationshipPluginParams from './relationshipPluginParamsFiles'
17
- import * as treeDataFormatters from './treeDataFormatterFiles'
18
- import * as treePluginParams from './treePluginParamsFiles'
19
-
20
- export interface ChartParamsFile {
21
- id: string
22
- description: string
23
- data: ChartParamsPartial
24
- }
25
-
26
- export interface DataFormatterFile<T extends ChartType> {
27
- id: string
28
- chartType: T
29
- description: string
30
- data: DataFormatterPartialTypeMap<T>
31
- }
32
-
33
- export interface PluginParamsFile<PluginParams> {
34
- id: string
35
- chartType: ChartType
36
- pluginName: string
37
- description: string
38
- data: Partial<PluginParams>
39
- }
40
-
41
- export interface PresetFile<T extends ChartType> {
42
- chartParamsId?: keyof typeof chartParams
43
- dataFormatterId?: T extends 'series' ? keyof typeof seriesDataFormatters
44
- : T extends 'grid' ? keyof typeof gridDataFormatters
45
- : T extends 'multiGrid' ? keyof typeof multiGridDataFormatters
46
- : T extends 'multiValue' ? keyof typeof multiValueDataFormatters
47
- : T extends 'relationship' ? keyof typeof relationshipDataFormatters
48
- : T extends 'tree' ? keyof typeof treeDataFormatters
49
- : undefined
50
- allPluginParamsIds?: T extends 'series' ? (keyof typeof seriesPluginParams)[]
51
- : T extends 'grid' ? (keyof typeof gridPluginParams)[]
52
- : T extends 'multiGrid' ? (keyof typeof multiGridPluginParams)[]
53
- : T extends 'multiValue' ? (keyof typeof multiValuePluginParams)[]
54
- : T extends 'relationship' ? (keyof typeof relationshipPluginParams)[]
55
- : T extends 'tree' ? (keyof typeof treePluginParams)[]
56
- : undefined,
57
- description: string
2
+ // -- series --
3
+ BubblesParams,
4
+ PieParams,
5
+ PieEventTextsParams,
6
+ PieLabelsParams,
7
+ RoseParams,
8
+ RoseLabelsParams,
9
+ SeriesLegendParams,
10
+
11
+ // -- grid --
12
+ BarsParams,
13
+ BarsPNParams,
14
+ BarStackParams,
15
+ BarsTriangleParams,
16
+ DotsParams,
17
+ GridLegendParams,
18
+ GroupAuxParams,
19
+ GroupAxisParams,
20
+ LineAreasParams,
21
+ LinesParams,
22
+ ScalingAreaParams,
23
+ ValueAxisParams,
24
+ ValueStackAxisParams,
25
+
26
+ // -- multiGrid --
27
+ MultiBarsParams,
28
+ MultiBarStackParams,
29
+ MultiBarsTriangleParams,
30
+ MultiDotsParams,
31
+ MultiGridLegendParams,
32
+ MultiGroupAxisParams,
33
+ MultiLineAreasParams,
34
+ MultiLinesParams,
35
+ MultiValueAxisParams,
36
+ MultiValueStackAxisParams,
37
+ OverlappingValueAxesParams,
38
+ OverlappingValueStackAxesParams,
39
+
40
+ // -- tree --
41
+ TreeLegendParams,
42
+ TreeMapParams,
43
+
44
+ // -- noneData --
45
+ TooltipParams
46
+ } from '@orbcharts/plugins-basic'
47
+
48
+ type DeepPartial<T> = Partial<{ [P in keyof T]: DeepPartial<T[P]> }>
49
+
50
+ // -- series --
51
+ // series的全部plugin參數
52
+ export type PresetSeriesPluginParams = PresetBubblesParams
53
+ & PresetPieParams
54
+ & PresetPieEventTextsParams
55
+ & PresetPieLabelsParams
56
+ & PresetRoseParams
57
+ & PresetRoseLabelsParams
58
+ & PresetSeriesLegendParams
59
+
60
+ export interface PresetBubblesParams {
61
+ Bubbles: Partial<BubblesParams>
62
+ }
63
+
64
+ export interface PresetPieParams {
65
+ Pie: Partial<PieParams>
66
+ }
67
+
68
+ export interface PresetPieEventTextsParams {
69
+ PieEventTexts: Partial<PieEventTextsParams>
70
+ }
71
+
72
+ export interface PresetPieLabelsParams {
73
+ PieLabels: Partial<PieLabelsParams>
74
+ }
75
+
76
+ export interface PresetRoseParams {
77
+ Rose: Partial<RoseParams>
78
+ }
79
+
80
+ export interface PresetRoseLabelsParams {
81
+ RoseLabels: Partial<RoseLabelsParams>
82
+ }
83
+
84
+ export interface PresetSeriesLegendParams {
85
+ SeriesLegend: Partial<SeriesLegendParams>
86
+ }
87
+
88
+ // -- grid --
89
+ // grid的全部plugin參數
90
+ export type PresetGridPluginParams = PresetBarsParams
91
+ & PresetBarsPNParams
92
+ & PresetBarStackParams
93
+ & PresetBarsTriangleParams
94
+ & PresetDotsParams
95
+ & PresetGridLegendParams
96
+ & PresetGroupAuxParams
97
+ & PresetGroupAxisParams
98
+ & PresetLineAreasParams
99
+ & PresetLinesParams
100
+ & PresetScalingAreaParams
101
+ & PresetValueAxisParams
102
+ & PresetValueStackAxisParams
103
+
104
+ export interface PresetBarsParams {
105
+ Bars: Partial<BarsParams>
106
+ }
107
+
108
+ export interface PresetBarsPNParams {
109
+ BarsPN: Partial<BarsPNParams>
110
+ }
111
+
112
+ export interface PresetBarStackParams {
113
+ BarStack: Partial<BarStackParams>
114
+ }
115
+
116
+ export interface PresetBarsTriangleParams {
117
+ BarsTriangle: Partial<BarsTriangleParams>
118
+ }
119
+
120
+ export interface PresetDotsParams {
121
+ Dots: Partial<DotsParams>
122
+ }
123
+
124
+ export interface PresetGridLegendParams {
125
+ GridLegend: Partial<GridLegendParams>
126
+ }
127
+
128
+ export interface PresetGroupAuxParams {
129
+ GroupAux: Partial<GroupAuxParams>
130
+ }
131
+
132
+ export interface PresetGroupAxisParams {
133
+ GroupAxis: Partial<GroupAxisParams>
134
+ }
135
+
136
+ export interface PresetLineAreasParams {
137
+ LineAreas: Partial<LineAreasParams>
138
+ }
139
+
140
+ export interface PresetLinesParams {
141
+ Lines: Partial<LinesParams>
58
142
  }
143
+
144
+ export interface PresetScalingAreaParams {
145
+ ScalingArea: Partial<ScalingAreaParams>
146
+ }
147
+
148
+ export interface PresetValueAxisParams {
149
+ ValueAxis: Partial<ValueAxisParams>
150
+ }
151
+
152
+ export interface PresetValueStackAxisParams {
153
+ ValueStackAxis: Partial<ValueStackAxisParams>
154
+ }
155
+
156
+ // -- multiGrid --
157
+ // multiGrid的全部plugin參數
158
+ export type PresetMultiGridPluginParams = PresetMultiBarsParams
159
+ & PresetMultiBarStackParams
160
+ & PresetMultiBarsTriangleParams
161
+ & PresetMultiDotsParams
162
+ & PresetMultiGridLegendParams
163
+ & PresetMultiGroupAxisParams
164
+ & PresetMultiLineAreasParams
165
+ & PresetMultiLinesParams
166
+ & PresetMultiValueAxisParams
167
+ & PresetMultiValueStackAxisParams
168
+ & PresetOverlappingValueAxesParams
169
+ & PresetOverlappingValueStackAxesParams
170
+
171
+ // multiGrid分開grid
172
+ export type PresetMultiGridSepratedPluginParams = Omit<PresetMultiGridPluginParams, 'OverlappingValueAxes' | 'OverlappingValueStackAxes'>
173
+
174
+ // multiGrid重疊grid
175
+ export type PresetMultiGridOverlappedPluginParams = Omit<PresetMultiGridPluginParams, 'PresetMultiGroupAxisParams' | 'PresetMultiValueAxisParams'>
176
+
177
+ export interface PresetMultiBarsParams {
178
+ MultiBars: Partial<MultiBarsParams>
179
+ }
180
+
181
+ export interface PresetMultiBarStackParams {
182
+ MultiBarStack: Partial<MultiBarStackParams>
183
+ }
184
+
185
+ export interface PresetMultiBarsTriangleParams {
186
+ MultiBarsTriangle: Partial<MultiBarsTriangleParams>
187
+ }
188
+
189
+ export interface PresetMultiDotsParams {
190
+ MultiDots: Partial<MultiDotsParams>
191
+ }
192
+
193
+ export interface PresetMultiGridLegendParams {
194
+ MultiGridLegend: DeepPartial<MultiGridLegendParams>
195
+ }
196
+
197
+ export interface PresetMultiGroupAxisParams {
198
+ MultiGroupAxis: Partial<MultiGroupAxisParams>
199
+ }
200
+
201
+ export interface PresetMultiLineAreasParams {
202
+ MultiLineAreas: Partial<MultiLineAreasParams>
203
+ }
204
+
205
+ export interface PresetMultiLinesParams {
206
+ MultiLines: Partial<MultiLinesParams>
207
+ }
208
+
209
+ export interface PresetMultiValueAxisParams {
210
+ MultiValueAxis: Partial<MultiValueAxisParams>
211
+ }
212
+
213
+ export interface PresetMultiValueStackAxisParams {
214
+ MultiValueStackAxis: Partial<MultiValueStackAxisParams>
215
+ }
216
+
217
+ export interface PresetOverlappingValueAxesParams {
218
+ OverlappingValueAxes: Partial<OverlappingValueAxesParams>
219
+ }
220
+
221
+ export interface PresetOverlappingValueStackAxesParams {
222
+ OverlappingValueStackAxes: Partial<OverlappingValueStackAxesParams>
223
+ }
224
+
225
+ // -- tree --
226
+ export type PresetTreePluginParams = PresetTreeLegendParams & PresetTreeMapParams
227
+
228
+ export interface PresetTreeLegendParams {
229
+ TreeLegend: Partial<TreeLegendParams>
230
+ }
231
+
232
+ export interface PresetTreeMapParams {
233
+ TreeMap: Partial<TreeMapParams>
234
+ }
235
+
236
+ // -- noneData --
237
+ // noneData的全部plugin參數
238
+ export type PresetNoneDataPluginParams = PresetTooltipParams
239
+
240
+ export interface PresetTooltipParams {
241
+ Tooltip: Partial<TooltipParams>
242
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "./dist/",
4
+ "sourceMap": true,
5
+ "noImplicitAny": true,
6
+ "module": "esnext",
7
+ "target": "es5",
8
+ "jsx": "react",
9
+ "allowJs": true,
10
+ "moduleResolution": "node",
11
+ "allowSyntheticDefaultImports" : true,
12
+ "esModuleInterop" : true
13
+ }
14
+ }
package/tsconfig.json CHANGED
@@ -1,14 +1,9 @@
1
1
  {
2
+ "extends": "./tsconfig.base.json",
2
3
  "compilerOptions": {
3
- "outDir": "./dist/",
4
- "sourceMap": true,
5
- "noImplicitAny": true,
6
- "module": "es6",
7
- "target": "es5",
8
- "jsx": "react",
9
- "allowJs": true,
10
- "moduleResolution": "node",
11
- "allowSyntheticDefaultImports" : true,
12
- "esModuleInterop" : true
4
+ "paths":{
5
+ "@orbcharts/core": ["./../orbcharts-core"],
6
+ "@orbcharts/plugins-basic": ["./../orbcharts-plugins-basic"]
7
+ }
13
8
  }
14
9
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./tsconfig.base.json"
3
+ }
@@ -0,0 +1,42 @@
1
+ import path from "path"
2
+ import { defineConfig } from 'vite'
3
+ import dts from 'vite-plugin-dts'
4
+ import tsconfig from 'vite-plugin-tsconfig'
5
+
6
+ export default defineConfig(({ command, mode }) => {
7
+ const alias = mode === 'production'
8
+ ? {}
9
+ : {
10
+ "@orbcharts/core": path.resolve(__dirname, "./../orbcharts-core"),
11
+ "@orbcharts/plugins-basic": path.resolve(__dirname, "./../orbcharts-plugins-basic")
12
+ }
13
+
14
+ const tsconfigPath = mode === 'production'
15
+ ? 'tsconfig.prod.json'
16
+ : 'tsconfig.json'
17
+
18
+ return {
19
+ plugins: [
20
+ tsconfig({
21
+ filename: tsconfigPath
22
+ }),
23
+ dts({
24
+ insertTypesEntry: true
25
+ })
26
+ ],
27
+ resolve: {
28
+ alias
29
+ },
30
+ compilerOptions: {
31
+ composite: true
32
+ },
33
+ build: {
34
+ lib: {
35
+ entry: "src/index.ts",
36
+ name: 'orbcharts-presets-basic',
37
+ formats: ["es", "umd"],
38
+ fileName: format => `orbcharts-presets-basic.${format}.js`
39
+ },
40
+ }
41
+ }
42
+ })
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_BOTTOM_AND_LEFT_PADDING: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_BOTTOM_LONG_PADDING: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_BOTTOM_PADDING: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_LEFT_PADDING: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_RIGHT_PADDING: ChartParamsFile;
@@ -1,3 +0,0 @@
1
- import { ChartParamsFile } from '../types';
2
-
3
- export declare const CP_TOP_AND_NO_BOTTOM_PADDING: ChartParamsFile;
@@ -1,10 +0,0 @@
1
- export { CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_AND_LEFT_PADDING_WITH_SERIES_HIGHLIGHT';
2
- export { CP_BOTTOM_AND_LEFT_PADDING } from './CP_BOTTOM_AND_LEFT_PADDING';
3
- export { CP_BOTTOM_LONG_PADDING } from './CP_BOTTOM_LONG_PADDING';
4
- export { CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_LONG_PADDING_WITH_SERIES_HIGHLIGHT';
5
- export { CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT';
6
- export { CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT } from './CP_BOTTOM_PADDING_WITH_SERIES_HIGHLIGHT';
7
- export { CP_BOTTOM_PADDING } from './CP_BOTTOM_PADDING';
8
- export { CP_LEFT_PADDING } from './CP_LEFT_PADDING';
9
- export { CP_TOP_AND_NO_BOTTOM_PADDING } from './CP_TOP_AND_NO_BOTTOM_PADDING';
10
- export { CP_RIGHT_PADDING } from './CP_RIGHT_PADDING';
@@ -1,9 +0,0 @@
1
- import { PresetPartial } from '@orbcharts/core';
2
- import { PresetFile } from './types';
3
-
4
- export declare const createSeriesPreset: (presetFile: PresetFile<"series">) => PresetPartial<"series">;
5
- export declare const createGridPreset: (presetFile: PresetFile<"grid">) => PresetPartial<"grid">;
6
- export declare const createMultiGridPreset: (presetFile: PresetFile<"multiGrid">) => PresetPartial<"multiGrid">;
7
- export declare const createMultiValuePreset: (presetFile: PresetFile<"multiValue">) => PresetPartial<"multiValue">;
8
- export declare const createRelationshipPreset: (presetFile: PresetFile<"relationship">) => PresetPartial<"relationship">;
9
- export declare const createTreePreset: (presetFile: PresetFile<"tree">) => PresetPartial<"tree">;
@@ -1,3 +0,0 @@
1
- import { DataFormatterFile } from '../types';
2
-
3
- export declare const DF_BOTTOM_VALUE_AXIS: DataFormatterFile<'grid'>;
@@ -1 +0,0 @@
1
- export { DF_BOTTOM_VALUE_AXIS } from './DF_BOTTOM_VALUE_AXIS';
@@ -1,4 +0,0 @@
1
- import { PluginParamsFile } from '../../types';
2
- import { BarsParams } from '@orbcharts/plugins-basic';
3
-
4
- export declare const PP_BARS_ROUND: PluginParamsFile<BarsParams>;
@@ -1,4 +0,0 @@
1
- import { PluginParamsFile } from '../../types';
2
- import { BarsParams } from '@orbcharts/plugins-basic';
3
-
4
- export declare const PP_BARS_THIN: PluginParamsFile<BarsParams>;
@@ -1,2 +0,0 @@
1
- export { PP_BARS_ROUND } from './PP_BARS_ROUND';
2
- export { PP_BARS_THIN } from './PP_BARS_THIN';
@@ -1,4 +0,0 @@
1
- import { PluginParamsFile } from '../../types';
2
- import { DotsParams } from '@orbcharts/plugins-basic';
3
-
4
- export declare const PP_DOTS_ONLY_SHOW_HIGHLIGHTED: PluginParamsFile<DotsParams>;
@@ -1,4 +0,0 @@
1
- import { PluginParamsFile } from '../../types';
2
- import { DotsParams } from '@orbcharts/plugins-basic';
3
-
4
- export declare const PP_DOTS_SOLID: PluginParamsFile<DotsParams>;
@@ -1,2 +0,0 @@
1
- export { PP_DOTS_ONLY_SHOW_HIGHLIGHTED } from './PP_DOTS_ONLY_SHOW_HIGHLIGHTED';
2
- export { PP_DOTS_SOLID } from './PP_DOTS_SOLID';
@@ -1,4 +0,0 @@
1
- import { PluginParamsFile } from '../../types';
2
- import { GridLegendParams } from '@orbcharts/plugins-basic';
3
-
4
- export declare const PP_GRID_LEGEND_BOTTOM: PluginParamsFile<GridLegendParams>;
@@ -1,4 +0,0 @@
1
- import { PluginParamsFile } from '../../types';
2
- import { GridLegendParams } from '@orbcharts/plugins-basic';
3
-
4
- export declare const PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST: PluginParamsFile<GridLegendParams>;
@@ -1,2 +0,0 @@
1
- export { PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST } from './PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST';
2
- export { PP_GRID_LEGEND_BOTTOM } from './PP_GRID_LEGEND_BOTTOM';
@@ -1,4 +0,0 @@
1
- import { PluginParamsFile } from '../../types';
2
- import { GroupAxisParams } from '@orbcharts/plugins-basic';
3
-
4
- export declare const PP_GROUP_AXIS_ROTATE_LABEL: PluginParamsFile<GroupAxisParams>;
@@ -1 +0,0 @@
1
- export { PP_GROUP_AXIS_ROTATE_LABEL } from './PP_GROUP_AXIS_ROTATE_LABEL';
@@ -1,4 +0,0 @@
1
- import { PluginParamsFile } from '../../types';
2
- import { LinesParams } from '@orbcharts/plugins-basic';
3
-
4
- export declare const PP_LINES_CURVE: PluginParamsFile<LinesParams>;
@@ -1 +0,0 @@
1
- export { PP_LINES_CURVE } from './PP_LINES_CURVE';
@@ -1,5 +0,0 @@
1
- export * from './Bars';
2
- export * from './Dots';
3
- export * from './GridLegend';
4
- export * from './GroupAxis';
5
- export * from './Lines';
@@ -1 +0,0 @@
1
- export declare const temp: {};
@@ -1 +0,0 @@
1
- export declare const temp: {};
@@ -1 +0,0 @@
1
- export declare const temp: {};
@@ -1 +0,0 @@
1
- export declare const temp: {};
@@ -1 +0,0 @@
1
- export declare const temp: {};