@orbcharts/presets-basic 3.0.0-beta.10 → 3.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/orbcharts-presets-basic.es.js +3031 -566
  2. package/dist/orbcharts-presets-basic.umd.js +1 -1
  3. package/dist/src/grid/PRESET_GRID_PN_SCALE_SIMPLE.d.ts +4 -0
  4. package/dist/src/grid/PRESET_GRID_SIMPLE.d.ts +4 -0
  5. package/dist/src/grid/PRESET_LINES_SIMPLE.d.ts +4 -0
  6. package/dist/src/grid/PRESET_LINE_AREAS_SIMPLE.d.ts +4 -0
  7. package/dist/src/grid/index.d.ts +4 -0
  8. package/dist/src/multiGrid/PRESET_MULTI_GRID_DIVERGING_SIMPLE.d.ts +4 -0
  9. package/dist/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.d.ts +3 -1
  10. package/dist/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE_SIMPLE.d.ts +6 -0
  11. package/dist/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID_SIMPLE.d.ts +4 -0
  12. package/dist/src/multiGrid/PRESET_MULTI_GRID_SIMPLE.d.ts +4 -0
  13. package/dist/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID_SIMPLE.d.ts +4 -0
  14. package/dist/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID_SIMPLE.d.ts +4 -0
  15. package/dist/src/multiGrid/index.d.ts +6 -0
  16. package/dist/src/multiValue/PRESET_MULTI_VALUE_SIMPLE.d.ts +4 -0
  17. package/dist/src/multiValue/PRESET_RACING_BARS_ALL_ITEMS.d.ts +4 -0
  18. package/dist/src/multiValue/PRESET_RACING_BARS_BASIC.d.ts +4 -0
  19. package/dist/src/multiValue/PRESET_RACING_BARS_FAST.d.ts +4 -0
  20. package/dist/src/multiValue/PRESET_RACING_BARS_FASTER.d.ts +4 -0
  21. package/dist/src/multiValue/PRESET_RACING_BARS_OUTSIDE_LABELS.d.ts +4 -0
  22. package/dist/src/multiValue/PRESET_RACING_BARS_SEPARATE_CATEGORY.d.ts +4 -0
  23. package/dist/src/multiValue/PRESET_RACING_BARS_SIMPLE.d.ts +4 -0
  24. package/dist/src/multiValue/PRESET_RACING_BARS_STOP.d.ts +4 -0
  25. package/dist/src/multiValue/PRESET_SCATTER_BASIC.d.ts +4 -0
  26. package/dist/src/multiValue/PRESET_SCATTER_BUBBLES_BASIC.d.ts +4 -0
  27. package/dist/src/multiValue/PRESET_SCATTER_BUBBLES_SEPARATE_CATEGORY.d.ts +4 -0
  28. package/dist/src/multiValue/PRESET_SCATTER_BUBBLES_SIMPLE.d.ts +4 -0
  29. package/dist/src/multiValue/PRESET_SCATTER_SEPARATE_CATEGORY.d.ts +4 -0
  30. package/dist/src/multiValue/PRESET_SCATTER_SIMPLE.d.ts +4 -0
  31. package/dist/src/multiValue/index.d.ts +15 -0
  32. package/dist/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_SIMPLE.d.ts +4 -0
  33. package/dist/src/relationship/PRESET_FORCE_DIRECTED_SIMPLE.d.ts +4 -0
  34. package/dist/src/relationship/index.d.ts +2 -0
  35. package/dist/src/series/PRESET_BUBBLES_BASIC.d.ts +4 -0
  36. package/dist/src/series/PRESET_BUBBLES_SIMPLE.d.ts +4 -0
  37. package/dist/src/series/PRESET_BUBBLES_SUM_SERIES.d.ts +4 -0
  38. package/dist/src/series/PRESET_PIE_SEPARATE_SERIES.d.ts +4 -0
  39. package/dist/src/series/PRESET_PIE_SIMPLE.d.ts +4 -0
  40. package/dist/src/series/PRESET_PIE_SUM_SERIES.d.ts +4 -0
  41. package/dist/src/series/PRESET_ROSE_SEPARATE_SERIES.d.ts +4 -0
  42. package/dist/src/series/PRESET_ROSE_SEPARATE_SERIES_AND_SUM_SERIES.d.ts +4 -0
  43. package/dist/src/series/PRESET_ROSE_SIMPLE.d.ts +4 -0
  44. package/dist/src/series/PRESET_ROSE_SUM_SERIES.d.ts +4 -0
  45. package/dist/src/series/index.d.ts +10 -0
  46. package/dist/src/tree/PRESET_TREE_MAP_SIMPLE.d.ts +4 -0
  47. package/dist/src/tree/index.d.ts +1 -0
  48. package/dist/src/types.d.ts +23 -17
  49. package/package.json +3 -3
  50. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +28 -24
  51. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +22 -13
  52. package/src/grid/PRESET_BARS_ROUND.ts +23 -6
  53. package/src/grid/PRESET_BARS_THIN.ts +23 -6
  54. package/src/grid/PRESET_GRID_BASIC.ts +23 -6
  55. package/src/grid/PRESET_GRID_HORIZONTAL.ts +22 -5
  56. package/src/grid/PRESET_GRID_PN_SCALE.ts +23 -6
  57. package/src/grid/PRESET_GRID_PN_SCALE_SIMPLE.ts +49 -0
  58. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +23 -6
  59. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +23 -6
  60. package/src/grid/PRESET_GRID_SIMPLE.ts +44 -0
  61. package/src/grid/PRESET_LINES_BASIC.ts +23 -10
  62. package/src/grid/PRESET_LINES_CURVE.ts +23 -10
  63. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +23 -10
  64. package/src/grid/PRESET_LINES_HORIZONTAL.ts +28 -23
  65. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +23 -10
  66. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +23 -10
  67. package/src/grid/PRESET_LINES_SIMPLE.ts +53 -0
  68. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +23 -10
  69. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +23 -6
  70. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +23 -6
  71. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +26 -15
  72. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +29 -18
  73. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +26 -15
  74. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +26 -15
  75. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +27 -17
  76. package/src/grid/PRESET_LINE_AREAS_SIMPLE.ts +57 -0
  77. package/src/grid/index.ts +4 -0
  78. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +23 -11
  79. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +25 -13
  80. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING_SIMPLE.ts +101 -0
  81. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +25 -12
  82. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE_SIMPLE.ts +81 -0
  83. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +24 -11
  84. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID_SIMPLE.ts +84 -0
  85. package/src/multiGrid/PRESET_MULTI_GRID_SIMPLE.ts +60 -0
  86. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +24 -9
  87. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID_SIMPLE.ts +110 -0
  88. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +24 -9
  89. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID_SIMPLE.ts +113 -0
  90. package/src/multiGrid/index.ts +6 -0
  91. package/src/multiValue/PRESET_MULTI_VALUE_BASIC.ts +23 -7
  92. package/src/multiValue/PRESET_MULTI_VALUE_SEPARATE_CATEGORY.ts +31 -7
  93. package/src/multiValue/PRESET_MULTI_VALUE_SIMPLE.ts +39 -0
  94. package/src/multiValue/PRESET_RACING_BARS_ALL_ITEMS.ts +44 -0
  95. package/src/multiValue/PRESET_RACING_BARS_BASIC.ts +43 -0
  96. package/src/multiValue/PRESET_RACING_BARS_FAST.ts +43 -0
  97. package/src/multiValue/PRESET_RACING_BARS_FASTER.ts +43 -0
  98. package/src/multiValue/PRESET_RACING_BARS_OUTSIDE_LABELS.ts +47 -0
  99. package/src/multiValue/PRESET_RACING_BARS_SEPARATE_CATEGORY.ts +60 -0
  100. package/src/multiValue/PRESET_RACING_BARS_SIMPLE.ts +43 -0
  101. package/src/multiValue/PRESET_RACING_BARS_STOP.ts +42 -0
  102. package/src/multiValue/PRESET_SCATTER_BASIC.ts +40 -0
  103. package/src/multiValue/PRESET_SCATTER_BUBBLES_BASIC.ts +40 -0
  104. package/src/multiValue/PRESET_SCATTER_BUBBLES_LINEAR_OPACITY.ts +24 -7
  105. package/src/multiValue/PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS.ts +24 -7
  106. package/src/multiValue/PRESET_SCATTER_BUBBLES_SEPARATE_CATEGORY.ts +43 -0
  107. package/src/multiValue/PRESET_SCATTER_BUBBLES_SIMPLE.ts +40 -0
  108. package/src/multiValue/PRESET_SCATTER_SEPARATE_CATEGORY.ts +51 -0
  109. package/src/multiValue/PRESET_SCATTER_SIMPLE.ts +40 -0
  110. package/src/multiValue/index.ts +16 -1
  111. package/src/params.ts +7 -4
  112. package/src/relationship/PRESET_FORCE_DIRECTED_BASIC.ts +21 -11
  113. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_BASIC.ts +21 -11
  114. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_FIX_ARROW_WIDTH.ts +21 -11
  115. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_NONE_ARROW.ts +21 -13
  116. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_NONE_ZOOM.ts +21 -11
  117. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_SIMPLE.ts +34 -0
  118. package/src/relationship/PRESET_FORCE_DIRECTED_FIX_FONT_SIZE.ts +21 -11
  119. package/src/relationship/PRESET_FORCE_DIRECTED_NONE_ARROW.ts +21 -11
  120. package/src/relationship/PRESET_FORCE_DIRECTED_NONE_ZOOM.ts +21 -11
  121. package/src/relationship/PRESET_FORCE_DIRECTED_SIMPLE.ts +34 -0
  122. package/src/relationship/index.ts +3 -1
  123. package/src/series/PRESET_BUBBLES_BASIC.ts +32 -0
  124. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +21 -4
  125. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +19 -4
  126. package/src/series/PRESET_BUBBLES_SIMPLE.ts +39 -0
  127. package/src/series/PRESET_BUBBLES_SUM_SERIES.ts +34 -0
  128. package/src/series/PRESET_PIE_BASIC.ts +21 -4
  129. package/src/series/PRESET_PIE_DONUT.ts +21 -4
  130. package/src/series/PRESET_PIE_HALF_DONUT.ts +21 -5
  131. package/src/series/PRESET_PIE_SEPARATE_SERIES.ts +34 -0
  132. package/src/series/PRESET_PIE_SIMPLE.ts +43 -0
  133. package/src/series/PRESET_PIE_SUM_SERIES.ts +34 -0
  134. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +21 -4
  135. package/src/series/PRESET_ROSE_BASIC.ts +27 -5
  136. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +27 -4
  137. package/src/series/PRESET_ROSE_SEPARATE_SERIES.ts +42 -0
  138. package/src/series/PRESET_ROSE_SEPARATE_SERIES_AND_SUM_SERIES.ts +43 -0
  139. package/src/series/PRESET_ROSE_SIMPLE.ts +43 -0
  140. package/src/series/PRESET_ROSE_SUM_SERIES.ts +40 -0
  141. package/src/series/PRESET_SERIES_BASIC.ts +21 -5
  142. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +3 -5
  143. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +3 -5
  144. package/src/series/PRESET_SERIES_SUM_SERIES.ts +4 -5
  145. package/src/series/index.ts +10 -0
  146. package/src/tree/PRESET_TREE_MAP_BASIC.ts +20 -3
  147. package/src/tree/PRESET_TREE_MAP_SIMPLE.ts +44 -0
  148. package/src/tree/index.ts +2 -1
  149. package/src/types.ts +38 -19
@@ -2,34 +2,47 @@ import type { PresetPartial } from '../../lib/core-types'
2
2
  import type { PresetGridPluginParams,
3
3
  PresetNoneDataPluginParams
4
4
  } from '../types'
5
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
6
5
 
7
6
  export const PRESET_LINE_AREAS_HORIZONTAL: PresetPartial<'grid', Partial<PresetGridPluginParams>
8
7
  & Partial<PresetNoneDataPluginParams>> = {
9
8
  name: 'PRESET_LINE_AREAS_HORIZONTAL',
10
- description: '橫向折線圖',
9
+ description: 'Horizontal LineArea',
10
+ descriptionZh: '橫向折線區域圖',
11
11
  chartParams: {
12
+ colors: {
13
+ light: {
14
+ label: [
15
+ "#4BABFF",
16
+ "#FFA0A0",
17
+ "#7DD3C4",
18
+ "#F9B052",
19
+ "#8454D4",
20
+ "#42C724",
21
+ "#FF4B4B",
22
+ "#904026",
23
+ "#4B25B3",
24
+ "#C50669"
25
+ ],
26
+ }
27
+ },
12
28
  padding: {
13
- top: 60,
14
- right: 60,
15
- bottom: 120,
29
+ top: 40,
30
+ right: 40,
31
+ bottom: 100,
16
32
  left: 160
17
33
  },
18
34
  highlightTarget: 'series'
19
35
  },
20
36
  dataFormatter: {
21
- // grid: {
22
- valueAxis: {
23
- position: 'bottom'
24
- },
25
- groupAxis: {
26
- position: 'left',
27
- scalePadding: 0
28
- },
29
- // }
37
+ valueAxis: {
38
+ position: 'bottom'
39
+ },
40
+ groupAxis: {
41
+ position: 'left',
42
+ scalePadding: 0
43
+ },
30
44
  },
31
- allPluginParams: {
32
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
45
+ pluginParams: {
33
46
  Lines: {},
34
47
  LineAreas: {},
35
48
  Dots: {},
@@ -37,8 +50,6 @@ export const PRESET_LINE_AREAS_HORIZONTAL: PresetPartial<'grid', Partial<PresetG
37
50
  ValueAxis: {},
38
51
  GroupAux: {},
39
52
  GridLegend: {
40
- // position: 'bottom',
41
- // justify: 'center',
42
53
  placement: 'bottom',
43
54
  padding: 14,
44
55
  listRectHeight: 2
@@ -2,30 +2,43 @@ import type { PresetPartial } from '../../lib/core-types'
2
2
  import type { PresetGridPluginParams,
3
3
  PresetNoneDataPluginParams
4
4
  } from '../types'
5
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
6
5
 
7
6
  export const PRESET_LINE_AREAS_LOOSE_TICKS: PresetPartial<'grid', Partial<PresetGridPluginParams>
8
7
  & Partial<PresetNoneDataPluginParams>> = {
9
8
  name: 'PRESET_LINE_AREAS_LOOSE_TICKS',
10
- description: '寬鬆標籤',
9
+ description: 'Loose Ticks LineArea',
10
+ descriptionZh: '寬鬆標籤的折線區域圖',
11
11
  chartParams: {
12
+ colors: {
13
+ light: {
14
+ label: [
15
+ "#4BABFF",
16
+ "#FFA0A0",
17
+ "#7DD3C4",
18
+ "#F9B052",
19
+ "#8454D4",
20
+ "#42C724",
21
+ "#FF4B4B",
22
+ "#904026",
23
+ "#4B25B3",
24
+ "#C50669"
25
+ ],
26
+ }
27
+ },
12
28
  padding: {
13
- top: 60,
14
- right: 60,
15
- bottom: 120,
16
- left: 60
29
+ top: 40,
30
+ right: 40,
31
+ bottom: 100,
32
+ left: 80
17
33
  },
18
34
  highlightTarget: 'series'
19
35
  },
20
36
  dataFormatter: {
21
- // grid: {
22
- groupAxis: {
23
- scalePadding: 0
24
- }
25
- // }
37
+ groupAxis: {
38
+ scalePadding: 0
39
+ }
26
40
  },
27
- allPluginParams: {
28
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
41
+ pluginParams: {
29
42
  Lines: {},
30
43
  LineAreas: {},
31
44
  Dots: {},
@@ -35,8 +48,6 @@ export const PRESET_LINE_AREAS_LOOSE_TICKS: PresetPartial<'grid', Partial<Preset
35
48
  ValueAxis: {},
36
49
  GroupAux: {},
37
50
  GridLegend: {
38
- // position: 'bottom',
39
- // justify: 'center',
40
51
  placement: 'bottom',
41
52
  padding: 14,
42
53
  listRectHeight: 2
@@ -2,30 +2,43 @@ import type { PresetPartial } from '../../lib/core-types'
2
2
  import type { PresetGridPluginParams,
3
3
  PresetNoneDataPluginParams
4
4
  } from '../types'
5
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
6
5
 
7
6
  export const PRESET_LINE_AREAS_ROTATE_AXIS_LABEL: PresetPartial<'grid', Partial<PresetGridPluginParams>
8
7
  & Partial<PresetNoneDataPluginParams>> = {
9
8
  name: 'PRESET_LINE_AREAS_ROTATE_AXIS_LABEL',
10
- description: '傾斜標籤',
9
+ description: 'Rotate Axis Label LineArea',
10
+ descriptionZh: '傾斜標籤的折線區域圖',
11
11
  chartParams: {
12
+ colors: {
13
+ light: {
14
+ label: [
15
+ "#4BABFF",
16
+ "#FFA0A0",
17
+ "#7DD3C4",
18
+ "#F9B052",
19
+ "#8454D4",
20
+ "#42C724",
21
+ "#FF4B4B",
22
+ "#904026",
23
+ "#4B25B3",
24
+ "#C50669"
25
+ ],
26
+ }
27
+ },
12
28
  padding: {
13
- top: 60,
14
- right: 60,
15
- bottom: 160,
16
- left: 60
29
+ top: 40,
30
+ right: 40,
31
+ bottom: 140,
32
+ left: 80
17
33
  },
18
34
  highlightTarget: 'series'
19
35
  },
20
36
  dataFormatter: {
21
- // grid: {
22
- groupAxis: {
23
- scalePadding: 0
24
- }
25
- // }
37
+ groupAxis: {
38
+ scalePadding: 0
39
+ }
26
40
  },
27
- allPluginParams: {
28
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
41
+ pluginParams: {
29
42
  Lines: {},
30
43
  LineAreas: {},
31
44
  Dots: {},
@@ -38,8 +51,6 @@ export const PRESET_LINE_AREAS_ROTATE_AXIS_LABEL: PresetPartial<'grid', Partial<
38
51
  labelRotate: -30
39
52
  },
40
53
  GridLegend: {
41
- // position: 'bottom',
42
- // justify: 'center',
43
54
  placement: 'bottom',
44
55
  padding: 14,
45
56
  listRectHeight: 2
@@ -2,32 +2,44 @@ import type { PresetPartial } from '../../lib/core-types'
2
2
  import type { PresetGridPluginParams,
3
3
  PresetNoneDataPluginParams
4
4
  } from '../types'
5
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
6
5
 
7
6
  export const PRESET_LINE_AREAS_SEPARATE_SERIES: PresetPartial<'grid', Partial<PresetGridPluginParams>
8
7
  & Partial<PresetNoneDataPluginParams>> = {
9
8
  name: 'PRESET_LINE_AREAS_SEPARATE_SERIES',
10
- description: 'LineAreas 分開顯示Series',
9
+ description: 'Separate Series LineArea',
10
+ descriptionZh: '分開顯示Series的折線區域圖',
11
11
  chartParams: {
12
+ colors: {
13
+ light: {
14
+ label: [
15
+ "#4BABFF",
16
+ "#FFA0A0",
17
+ "#7DD3C4",
18
+ "#F9B052",
19
+ "#8454D4",
20
+ "#42C724",
21
+ "#FF4B4B",
22
+ "#904026",
23
+ "#4B25B3",
24
+ "#C50669"
25
+ ],
26
+ }
27
+ },
12
28
  padding: {
13
- top: 60,
14
- right: 60,
15
- bottom: 160,
16
- left: 60
29
+ top: 40,
30
+ right: 40,
31
+ bottom: 140,
32
+ left: 80
17
33
  },
18
34
  highlightTarget: 'series'
19
35
  },
20
36
  dataFormatter: {
21
- // grid: {
22
- // seriesSlotIndexes: [0, 1],
23
- separateSeries: true,
24
- groupAxis: {
25
- scalePadding: 0
26
- }
27
- // },
37
+ separateSeries: true,
38
+ groupAxis: {
39
+ scalePadding: 0
40
+ }
28
41
  },
29
- allPluginParams: {
30
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
42
+ pluginParams: {
31
43
  Lines: {},
32
44
  LineAreas: {},
33
45
  Dots: {},
@@ -40,8 +52,6 @@ export const PRESET_LINE_AREAS_SEPARATE_SERIES: PresetPartial<'grid', Partial<Pr
40
52
  labelRotate: -30
41
53
  },
42
54
  GridLegend: {
43
- // position: 'bottom',
44
- // justify: 'center',
45
55
  placement: 'bottom',
46
56
  padding: 14,
47
57
  listRectHeight: 2
@@ -0,0 +1,57 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetGridPluginParams,
3
+ PresetNoneDataPluginParams
4
+ } from '../types'
5
+
6
+ export const PRESET_LINE_AREAS_SIMPLE: PresetPartial<'grid', Partial<PresetGridPluginParams>
7
+ & Partial<PresetNoneDataPluginParams>> = {
8
+ name: 'PRESET_LINE_AREAS_SIMPLE',
9
+ description: 'Simple LineArea',
10
+ descriptionZh: '簡單折線區域圖',
11
+ chartParams: {
12
+ colors: {
13
+ light: {
14
+ label: [
15
+ "#4BABFF",
16
+ "#FFA0A0",
17
+ "#7DD3C4",
18
+ "#F9B052",
19
+ "#8454D4",
20
+ "#42C724",
21
+ "#FF4B4B",
22
+ "#904026",
23
+ "#4B25B3",
24
+ "#C50669"
25
+ ],
26
+ }
27
+ },
28
+ padding: {
29
+ top: 40,
30
+ right: 40,
31
+ bottom: 80,
32
+ left: 40
33
+ },
34
+ highlightTarget: 'series'
35
+ },
36
+ dataFormatter: {
37
+ groupAxis: {
38
+ scalePadding: 0
39
+ },
40
+ valueAxis: {
41
+ scaleRange: [0, 0.95]
42
+ }
43
+ },
44
+ pluginParams: {
45
+ Lines: {},
46
+ LineAreas: {},
47
+ Dots: {},
48
+ GroupAxis: {},
49
+ ValueAxis: {},
50
+ GroupAux: {},
51
+ GridLegend: {
52
+ placement: 'bottom',
53
+ padding: 7,
54
+ listRectHeight: 2
55
+ }
56
+ }
57
+ }
package/src/grid/index.ts CHANGED
@@ -4,9 +4,11 @@ export { PRESET_BARS_ROUND } from './PRESET_BARS_ROUND'
4
4
  export { PRESET_BARS_THIN } from './PRESET_BARS_THIN'
5
5
  export { PRESET_GRID_BASIC } from './PRESET_GRID_BASIC'
6
6
  export { PRESET_GRID_HORIZONTAL } from './PRESET_GRID_HORIZONTAL'
7
+ export { PRESET_GRID_PN_SCALE_SIMPLE } from './PRESET_GRID_PN_SCALE_SIMPLE'
7
8
  export { PRESET_GRID_PN_SCALE } from './PRESET_GRID_PN_SCALE'
8
9
  export { PRESET_GRID_ROTATE_AXIS_LABEL } from './PRESET_GRID_ROTATE_AXIS_LABEL'
9
10
  export { PRESET_GRID_SEPARATE_SERIES } from './PRESET_GRID_SEPARATE_SERIES'
11
+ export { PRESET_GRID_SIMPLE } from './PRESET_GRID_SIMPLE'
10
12
  export { PRESET_LINE_AREAS_BASIC } from './PRESET_LINE_AREAS_BASIC'
11
13
  export { PRESET_LINE_AREAS_CURVE } from './PRESET_LINE_AREAS_CURVE'
12
14
  // export { PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS } from './PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS'
@@ -14,10 +16,12 @@ export { PRESET_LINE_AREAS_HORIZONTAL } from './PRESET_LINE_AREAS_HORIZONTAL'
14
16
  export { PRESET_LINE_AREAS_LOOSE_TICKS } from './PRESET_LINE_AREAS_LOOSE_TICKS'
15
17
  export { PRESET_LINE_AREAS_ROTATE_AXIS_LABEL } from './PRESET_LINE_AREAS_ROTATE_AXIS_LABEL'
16
18
  export { PRESET_LINE_AREAS_SEPARATE_SERIES } from './PRESET_LINE_AREAS_SEPARATE_SERIES'
19
+ export { PRESET_LINE_AREAS_SIMPLE } from './PRESET_LINE_AREAS_SIMPLE'
17
20
  export { PRESET_LINES_BASIC } from './PRESET_LINES_BASIC'
18
21
  export { PRESET_LINES_CURVE } from './PRESET_LINES_CURVE'
19
22
  // export { PRESET_LINES_HIGHLIGHT_GROUP_DOTS } from './PRESET_LINES_HIGHLIGHT_GROUP_DOTS'
20
23
  export { PRESET_LINES_HORIZONTAL } from './PRESET_LINES_HORIZONTAL'
21
24
  export { PRESET_LINES_LOOSE_TICKS } from './PRESET_LINES_LOOSE_TICKS'
22
25
  export { PRESET_LINES_ROTATE_AXIS_LABEL } from './PRESET_LINES_ROTATE_AXIS_LABEL'
26
+ export { PRESET_LINES_SIMPLE } from './PRESET_LINES_SIMPLE'
23
27
  export { PRESET_LINES_WITH_SOLID_DOTS } from './PRESET_LINES_WITH_SOLID_DOTS'
@@ -3,27 +3,39 @@ import type {
3
3
  PresetMultiGridPluginParams,
4
4
  PresetNoneDataPluginParams
5
5
  } from '../types'
6
- // import { ALL_PLUGIN_PARAMS_MULTI_GRID, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
7
6
 
8
7
  export const PRESET_MULTI_GRID_BASIC: PresetPartial<'multiGrid', Partial<PresetMultiGridPluginParams>
9
8
  & Partial<PresetNoneDataPluginParams>> = {
10
9
  name: 'PRESET_MULTI_GRID_BASIC',
11
- description: '基本MultiGrid參數',
10
+ description: 'Basic MultiGrid',
11
+ descriptionZh: '基本MultiGrid參數',
12
12
  chartParams: {
13
+ colors: {
14
+ light: {
15
+ label: [
16
+ "#4BABFF",
17
+ "#94D6CB",
18
+ "#F9B052",
19
+ "#8454D4",
20
+ "#D58C75",
21
+ "#42C724",
22
+ "#FF8B8B",
23
+ "#904026",
24
+ "#C50669",
25
+ "#4B25B3"
26
+ ],
27
+ }
28
+ },
13
29
  padding: {
14
- top: 60,
15
- right: 60,
16
- bottom: 120,
17
- left: 60
30
+ top: 40,
31
+ right: 40,
32
+ bottom: 100,
33
+ left: 80
18
34
  },
19
35
  highlightTarget: 'series'
20
36
  },
21
- allPluginParams: {
22
- // ...ALL_PLUGIN_PARAMS_MULTI_GRID,
23
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
37
+ pluginParams: {
24
38
  MultiGridLegend: {
25
- // position: 'bottom',
26
- // justify: 'center',
27
39
  placement: 'bottom',
28
40
  padding: 14,
29
41
  gridList: [
@@ -3,18 +3,34 @@ import type {
3
3
  PresetMultiGridPluginParams,
4
4
  PresetNoneDataPluginParams
5
5
  } from '../types'
6
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
7
6
 
8
7
  export const PRESET_MULTI_GRID_DIVERGING: PresetPartial<'multiGrid', Partial<PresetMultiGridPluginParams>
9
8
  & Partial<PresetNoneDataPluginParams>> = {
10
9
  name: 'PRESET_MULTI_GRID_DIVERGING',
11
- description: '雙向折線圖',
10
+ description: 'Diverging Grid',
11
+ descriptionZh: '雙向Grid',
12
12
  chartParams: {
13
+ colors: {
14
+ light: {
15
+ label: [
16
+ "#4BABFF",
17
+ "#94D6CB",
18
+ "#F9B052",
19
+ "#8454D4",
20
+ "#D58C75",
21
+ "#42C724",
22
+ "#FF8B8B",
23
+ "#904026",
24
+ "#C50669",
25
+ "#4B25B3"
26
+ ],
27
+ }
28
+ },
13
29
  padding: {
14
- top: 60,
15
- right: 60,
16
- bottom: 120,
17
- left: 60
30
+ top: 40,
31
+ right: 40,
32
+ bottom: 100,
33
+ left: 80
18
34
  },
19
35
  },
20
36
  dataFormatter: {
@@ -40,16 +56,14 @@ export const PRESET_MULTI_GRID_DIVERGING: PresetPartial<'multiGrid', Partial<Pre
40
56
  ],
41
57
  // 設定排版方式
42
58
  container: {
43
- gap: 200,
59
+ gap: 160,
44
60
  rowAmount: 1,
45
61
  columnAmount: 2
46
62
  },
47
63
  separateGrid: true // 將兩個grid拆分
48
64
  },
49
- allPluginParams: {
50
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
65
+ pluginParams: {
51
66
  MultiGroupAxis: {
52
- tickPadding: 60, // 加長間距
53
67
  gridIndexes: [0] // 只顯示一個
54
68
  },
55
69
  MultiValueAxis: {
@@ -61,7 +75,7 @@ export const PRESET_MULTI_GRID_DIVERGING: PresetPartial<'multiGrid', Partial<Pre
61
75
  MultiBars: {
62
76
  gridIndexes: [0, 1]
63
77
  },
64
- MultiStackedBar: {
78
+ MultiStackedBars: {
65
79
  gridIndexes: [0, 1]
66
80
  },
67
81
  MultiBarsTriangle: {
@@ -77,8 +91,6 @@ export const PRESET_MULTI_GRID_DIVERGING: PresetPartial<'multiGrid', Partial<Pre
77
91
  gridIndexes: [0, 1]
78
92
  },
79
93
  MultiGridLegend: {
80
- // position: 'bottom',
81
- // justify: 'center',
82
94
  placement: 'bottom',
83
95
  padding: 14,
84
96
  }
@@ -0,0 +1,101 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type {
3
+ PresetMultiGridPluginParams,
4
+ PresetNoneDataPluginParams
5
+ } from '../types'
6
+
7
+ export const PRESET_MULTI_GRID_DIVERGING_SIMPLE: PresetPartial<'multiGrid', Partial<PresetMultiGridPluginParams>
8
+ & Partial<PresetNoneDataPluginParams>> = {
9
+ name: 'PRESET_MULTI_GRID_DIVERGING_SIMPLE',
10
+ description: 'Simple diverging Grid',
11
+ descriptionZh: '簡單雙向Grid',
12
+ chartParams: {
13
+ colors: {
14
+ light: {
15
+ label: [
16
+ "#4BABFF",
17
+ "#94D6CB",
18
+ "#F9B052",
19
+ "#8454D4",
20
+ "#D58C75",
21
+ "#42C724",
22
+ "#FF8B8B",
23
+ "#904026",
24
+ "#C50669",
25
+ "#4B25B3"
26
+ ],
27
+ }
28
+ },
29
+ padding: {
30
+ top: 40,
31
+ right: 40,
32
+ bottom: 60,
33
+ left: 40
34
+ },
35
+ },
36
+ dataFormatter: {
37
+ gridList: [
38
+ // 第一個grid
39
+ {
40
+ groupAxis: {
41
+ position: 'right'
42
+ },
43
+ valueAxis: {
44
+ position: 'bottom',
45
+ scaleRange: [0, 0.95]
46
+ },
47
+ },
48
+ // 第二個grid
49
+ {
50
+ groupAxis: {
51
+ position: 'left'
52
+ },
53
+ valueAxis: {
54
+ position: 'bottom',
55
+ scaleRange: [0, 0.95]
56
+ },
57
+ }
58
+ ],
59
+ // 設定排版方式
60
+ container: {
61
+ gap: 100,
62
+ rowAmount: 1,
63
+ columnAmount: 2
64
+ },
65
+ separateGrid: true // 將兩個grid拆分
66
+ },
67
+ pluginParams: {
68
+ MultiGroupAxis: {
69
+ tickPadding: 10,
70
+ gridIndexes: [0] // 只顯示一個
71
+ },
72
+ MultiValueAxis: {
73
+ gridIndexes: [0, 1]
74
+ },
75
+ MultiStackedValueAxis: {
76
+ gridIndexes: [0, 1]
77
+ },
78
+ MultiBars: {
79
+ gridIndexes: [0, 1]
80
+ },
81
+ MultiStackedBars: {
82
+ gridIndexes: [0, 1]
83
+ },
84
+ MultiBarsTriangle: {
85
+ gridIndexes: [0, 1]
86
+ },
87
+ MultiLines: {
88
+ gridIndexes: [0, 1]
89
+ },
90
+ MultiLineAreas: {
91
+ gridIndexes: [0, 1]
92
+ },
93
+ MultiDots: {
94
+ gridIndexes: [0, 1]
95
+ },
96
+ MultiGridLegend: {
97
+ placement: 'bottom',
98
+ padding: 7,
99
+ }
100
+ }
101
+ }
@@ -3,36 +3,49 @@ import type {
3
3
  PresetMultiGridPluginParams,
4
4
  PresetNoneDataPluginParams
5
5
  } from '../types'
6
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
7
6
 
8
7
  type PresetMultiGridRoundPluginParams = Omit<PresetMultiGridPluginParams, 'MultiBarsTriangle'>
9
8
 
10
- export const PRESET_MULTI_GRID_ROUND_STYLE: PresetPartial<'multiGrid', Partial<PresetMultiGridPluginParams>
9
+ export const PRESET_MULTI_GRID_ROUND_STYLE: PresetPartial<'multiGrid', Partial<PresetMultiGridRoundPluginParams>
11
10
  & Partial<PresetNoneDataPluginParams>> = {
12
11
  name: 'PRESET_MULTI_GRID_ROUND_STYLE',
13
- description: 'MultiGrid圓弧風格',
12
+ description: 'MultiGrid with round style',
13
+ descriptionZh: 'MultiGrid圓弧風格',
14
14
  chartParams: {
15
+ colors: {
16
+ light: {
17
+ label: [
18
+ "#4BABFF",
19
+ "#94D6CB",
20
+ "#F9B052",
21
+ "#8454D4",
22
+ "#D58C75",
23
+ "#42C724",
24
+ "#FF8B8B",
25
+ "#904026",
26
+ "#C50669",
27
+ "#4B25B3"
28
+ ],
29
+ }
30
+ },
15
31
  padding: {
16
- top: 60,
17
- right: 60,
18
- bottom: 120,
19
- left: 60
32
+ top: 40,
33
+ right: 40,
34
+ bottom: 100,
35
+ left: 80
20
36
  },
21
37
  highlightTarget: 'series'
22
38
  },
23
- allPluginParams: {
24
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
39
+ pluginParams: {
25
40
  MultiBars: {
26
41
  barWidth: 0,
27
42
  barPadding: 1,
28
43
  barGroupPadding: 10,
29
44
  barRadius: true,
30
45
  },
31
- MultiStackedBar: {},
46
+ MultiStackedBars: {},
32
47
  MultiDots: {},
33
48
  MultiGridLegend: {
34
- // position: 'bottom',
35
- // justify: 'center',
36
49
  placement: 'bottom',
37
50
  padding: 14,
38
51
  gridList: [