@orbcharts/presets-basic 3.0.0-alpha.32 → 3.0.0-alpha.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/LICENSE +200 -200
  2. package/package.json +43 -43
  3. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +62 -62
  4. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +59 -59
  5. package/src/grid/PRESET_BARS_ROUND.ts +46 -46
  6. package/src/grid/PRESET_BARS_THIN.ts +43 -43
  7. package/src/grid/PRESET_GRID_BASIC.ts +25 -25
  8. package/src/grid/PRESET_GRID_HORIZONTAL.ts +42 -42
  9. package/src/grid/PRESET_GRID_PN_SCALE.ts +33 -33
  10. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +33 -33
  11. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +38 -38
  12. package/src/grid/PRESET_LINES_BASIC.ts +44 -44
  13. package/src/grid/PRESET_LINES_CURVE.ts +47 -47
  14. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +46 -46
  15. package/src/grid/PRESET_LINES_HORIZONTAL.ts +60 -60
  16. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +46 -46
  17. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +49 -49
  18. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +48 -48
  19. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +54 -54
  20. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +59 -59
  21. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +58 -58
  22. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +58 -58
  23. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +56 -56
  24. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +59 -59
  25. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +61 -61
  26. package/src/grid/index.ts +22 -22
  27. package/src/index.ts +4 -4
  28. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +36 -36
  29. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +85 -85
  30. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +57 -57
  31. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +59 -59
  32. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +103 -103
  33. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +121 -121
  34. package/src/multiGrid/index.ts +6 -6
  35. package/src/params.ts +56 -56
  36. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +19 -19
  37. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +29 -29
  38. package/src/series/PRESET_PIE_DONUT.ts +23 -23
  39. package/src/series/PRESET_PIE_HALF_DONUT.ts +36 -36
  40. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +24 -24
  41. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +23 -23
  42. package/src/series/PRESET_SERIES_BASIC.ts +15 -15
  43. package/src/series/PRESET_SERIES_DESC.ts +15 -15
  44. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +15 -15
  45. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +16 -16
  46. package/src/series/PRESET_SERIES_SUM_SERIES.ts +15 -15
  47. package/src/series/index.ts +11 -11
  48. package/src/tree/PRESET_TREE_BASIC.ts +25 -25
  49. package/src/types.ts +241 -241
  50. package/tsconfig.base.json +13 -13
  51. package/tsconfig.json +2 -2
  52. package/vite.config.js +22 -22
@@ -1,59 +1,59 @@
1
- import type { PresetPartial } from '@orbcharts/core'
2
- import type { PresetLinesParams,
3
- PresetLineAreasParams,
4
- PresetDotsParams,
5
- PresetGroupAxisParams,
6
- PresetValueAxisParams,
7
- PresetGroupAuxParams,
8
- PresetGridLegendParams,
9
- PresetNoneDataPluginParams
10
- } from '../types'
11
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
12
-
13
- export const PRESET_LINE_AREAS_ROTATE_AXIS_LABEL: PresetPartial<'grid', PresetLinesParams
14
- & PresetLineAreasParams
15
- & PresetDotsParams
16
- & PresetGridLegendParams
17
- & PresetGroupAxisParams
18
- & PresetValueAxisParams
19
- & PresetGroupAuxParams
20
- & PresetNoneDataPluginParams> = {
21
- name: 'PRESET_LINE_AREAS_ROTATE_AXIS_LABEL',
22
- description: '傾斜標籤',
23
- chartParams: {
24
- padding: {
25
- top: 60,
26
- right: 60,
27
- bottom: 160,
28
- left: 60
29
- },
30
- highlightTarget: 'series'
31
- },
32
- dataFormatter: {
33
- grid: {
34
- groupAxis: {
35
- scalePadding: 0
36
- }
37
- }
38
- },
39
- allPluginParams: {
40
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
41
- Lines: {},
42
- LineAreas: {},
43
- Dots: {},
44
- GroupAxis: {
45
- tickPadding: 15,
46
- tickTextRotate: -30
47
- },
48
- ValueAxis: {},
49
- GroupAux: {
50
- labelRotate: -30
51
- },
52
- GridLegend: {
53
- position: 'bottom',
54
- justify: 'center',
55
- padding: 14,
56
- listRectHeight: 2
57
- }
58
- }
59
- }
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetLinesParams,
3
+ PresetLineAreasParams,
4
+ PresetDotsParams,
5
+ PresetGroupAxisParams,
6
+ PresetValueAxisParams,
7
+ PresetGroupAuxParams,
8
+ PresetGridLegendParams,
9
+ PresetNoneDataPluginParams
10
+ } from '../types'
11
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
12
+
13
+ export const PRESET_LINE_AREAS_ROTATE_AXIS_LABEL: PresetPartial<'grid', PresetLinesParams
14
+ & PresetLineAreasParams
15
+ & PresetDotsParams
16
+ & PresetGridLegendParams
17
+ & PresetGroupAxisParams
18
+ & PresetValueAxisParams
19
+ & PresetGroupAuxParams
20
+ & PresetNoneDataPluginParams> = {
21
+ name: 'PRESET_LINE_AREAS_ROTATE_AXIS_LABEL',
22
+ description: '傾斜標籤',
23
+ chartParams: {
24
+ padding: {
25
+ top: 60,
26
+ right: 60,
27
+ bottom: 160,
28
+ left: 60
29
+ },
30
+ highlightTarget: 'series'
31
+ },
32
+ dataFormatter: {
33
+ grid: {
34
+ groupAxis: {
35
+ scalePadding: 0
36
+ }
37
+ }
38
+ },
39
+ allPluginParams: {
40
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
41
+ Lines: {},
42
+ LineAreas: {},
43
+ Dots: {},
44
+ GroupAxis: {
45
+ tickPadding: 15,
46
+ tickTextRotate: -30
47
+ },
48
+ ValueAxis: {},
49
+ GroupAux: {
50
+ labelRotate: -30
51
+ },
52
+ GridLegend: {
53
+ position: 'bottom',
54
+ justify: 'center',
55
+ padding: 14,
56
+ listRectHeight: 2
57
+ }
58
+ }
59
+ }
@@ -1,61 +1,61 @@
1
- import type { PresetPartial } from '@orbcharts/core'
2
- import type { PresetLinesParams,
3
- PresetLineAreasParams,
4
- PresetDotsParams,
5
- PresetGroupAxisParams,
6
- PresetValueAxisParams,
7
- PresetGroupAuxParams,
8
- PresetGridLegendParams,
9
- PresetNoneDataPluginParams
10
- } from '../types'
11
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
12
-
13
- export const PRESET_LINE_AREAS_SEPARATE_SERIES: PresetPartial<'grid', PresetLinesParams
14
- & PresetLineAreasParams
15
- & PresetDotsParams
16
- & PresetGridLegendParams
17
- & PresetGroupAxisParams
18
- & PresetValueAxisParams
19
- & PresetGroupAuxParams
20
- & PresetNoneDataPluginParams> = {
21
- name: 'PRESET_LINE_AREAS_SEPARATE_SERIES',
22
- description: 'LineAreas 分開顯示Series',
23
- chartParams: {
24
- padding: {
25
- top: 60,
26
- right: 60,
27
- bottom: 160,
28
- left: 60
29
- },
30
- highlightTarget: 'series'
31
- },
32
- dataFormatter: {
33
- grid: {
34
- // seriesSlotIndexes: [0, 1],
35
- separateSeries: true,
36
- groupAxis: {
37
- scalePadding: 0
38
- }
39
- },
40
- },
41
- allPluginParams: {
42
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
43
- Lines: {},
44
- LineAreas: {},
45
- Dots: {},
46
- GroupAxis: {
47
- tickPadding: 15,
48
- tickTextRotate: -30
49
- },
50
- ValueAxis: {},
51
- GroupAux: {
52
- labelRotate: -30
53
- },
54
- GridLegend: {
55
- position: 'bottom',
56
- justify: 'center',
57
- padding: 14,
58
- listRectHeight: 2
59
- }
60
- }
61
- }
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetLinesParams,
3
+ PresetLineAreasParams,
4
+ PresetDotsParams,
5
+ PresetGroupAxisParams,
6
+ PresetValueAxisParams,
7
+ PresetGroupAuxParams,
8
+ PresetGridLegendParams,
9
+ PresetNoneDataPluginParams
10
+ } from '../types'
11
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
12
+
13
+ export const PRESET_LINE_AREAS_SEPARATE_SERIES: PresetPartial<'grid', PresetLinesParams
14
+ & PresetLineAreasParams
15
+ & PresetDotsParams
16
+ & PresetGridLegendParams
17
+ & PresetGroupAxisParams
18
+ & PresetValueAxisParams
19
+ & PresetGroupAuxParams
20
+ & PresetNoneDataPluginParams> = {
21
+ name: 'PRESET_LINE_AREAS_SEPARATE_SERIES',
22
+ description: 'LineAreas 分開顯示Series',
23
+ chartParams: {
24
+ padding: {
25
+ top: 60,
26
+ right: 60,
27
+ bottom: 160,
28
+ left: 60
29
+ },
30
+ highlightTarget: 'series'
31
+ },
32
+ dataFormatter: {
33
+ grid: {
34
+ // seriesSlotIndexes: [0, 1],
35
+ separateSeries: true,
36
+ groupAxis: {
37
+ scalePadding: 0
38
+ }
39
+ },
40
+ },
41
+ allPluginParams: {
42
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
43
+ Lines: {},
44
+ LineAreas: {},
45
+ Dots: {},
46
+ GroupAxis: {
47
+ tickPadding: 15,
48
+ tickTextRotate: -30
49
+ },
50
+ ValueAxis: {},
51
+ GroupAux: {
52
+ labelRotate: -30
53
+ },
54
+ GridLegend: {
55
+ position: 'bottom',
56
+ justify: 'center',
57
+ padding: 14,
58
+ listRectHeight: 2
59
+ }
60
+ }
61
+ }
package/src/grid/index.ts CHANGED
@@ -1,23 +1,23 @@
1
- export { PRESET_BARS_HORIZONTAL_AND_ROUND } from './PRESET_BARS_HORIZONTAL_AND_ROUND'
2
- export { PRESET_BARS_HORIZONTAL_AND_THIN } from './PRESET_BARS_HORIZONTAL_AND_THIN'
3
- export { PRESET_BARS_ROUND } from './PRESET_BARS_ROUND'
4
- export { PRESET_BARS_THIN } from './PRESET_BARS_THIN'
5
- export { PRESET_GRID_BASIC } from './PRESET_GRID_BASIC'
6
- export { PRESET_GRID_HORIZONTAL } from './PRESET_GRID_HORIZONTAL'
7
- export { PRESET_GRID_PN_SCALE } from './PRESET_GRID_PN_SCALE'
8
- export { PRESET_GRID_ROTATE_AXIS_LABEL } from './PRESET_GRID_ROTATE_AXIS_LABEL'
9
- export { PRESET_GRID_SEPARATE_SERIES } from './PRESET_GRID_SEPARATE_SERIES'
10
- export { PRESET_LINE_AREAS_BASIC } from './PRESET_LINE_AREAS_BASIC'
11
- export { PRESET_LINE_AREAS_CURVE } from './PRESET_LINE_AREAS_CURVE'
12
- export { PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS } from './PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS'
13
- export { PRESET_LINE_AREAS_HORIZONTAL } from './PRESET_LINE_AREAS_HORIZONTAL'
14
- export { PRESET_LINE_AREAS_LOOSE_TICKS } from './PRESET_LINE_AREAS_LOOSE_TICKS'
15
- export { PRESET_LINE_AREAS_ROTATE_AXIS_LABEL } from './PRESET_LINE_AREAS_ROTATE_AXIS_LABEL'
16
- export { PRESET_LINE_AREAS_SEPARATE_SERIES } from './PRESET_LINE_AREAS_SEPARATE_SERIES'
17
- export { PRESET_LINES_BASIC } from './PRESET_LINES_BASIC'
18
- export { PRESET_LINES_CURVE } from './PRESET_LINES_CURVE'
19
- export { PRESET_LINES_HIGHLIGHT_GROUP_DOTS } from './PRESET_LINES_HIGHLIGHT_GROUP_DOTS'
20
- export { PRESET_LINES_HORIZONTAL } from './PRESET_LINES_HORIZONTAL'
21
- export { PRESET_LINES_LOOSE_TICKS } from './PRESET_LINES_LOOSE_TICKS'
22
- export { PRESET_LINES_ROTATE_AXIS_LABEL } from './PRESET_LINES_ROTATE_AXIS_LABEL'
1
+ export { PRESET_BARS_HORIZONTAL_AND_ROUND } from './PRESET_BARS_HORIZONTAL_AND_ROUND'
2
+ export { PRESET_BARS_HORIZONTAL_AND_THIN } from './PRESET_BARS_HORIZONTAL_AND_THIN'
3
+ export { PRESET_BARS_ROUND } from './PRESET_BARS_ROUND'
4
+ export { PRESET_BARS_THIN } from './PRESET_BARS_THIN'
5
+ export { PRESET_GRID_BASIC } from './PRESET_GRID_BASIC'
6
+ export { PRESET_GRID_HORIZONTAL } from './PRESET_GRID_HORIZONTAL'
7
+ export { PRESET_GRID_PN_SCALE } from './PRESET_GRID_PN_SCALE'
8
+ export { PRESET_GRID_ROTATE_AXIS_LABEL } from './PRESET_GRID_ROTATE_AXIS_LABEL'
9
+ export { PRESET_GRID_SEPARATE_SERIES } from './PRESET_GRID_SEPARATE_SERIES'
10
+ export { PRESET_LINE_AREAS_BASIC } from './PRESET_LINE_AREAS_BASIC'
11
+ export { PRESET_LINE_AREAS_CURVE } from './PRESET_LINE_AREAS_CURVE'
12
+ export { PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS } from './PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS'
13
+ export { PRESET_LINE_AREAS_HORIZONTAL } from './PRESET_LINE_AREAS_HORIZONTAL'
14
+ export { PRESET_LINE_AREAS_LOOSE_TICKS } from './PRESET_LINE_AREAS_LOOSE_TICKS'
15
+ export { PRESET_LINE_AREAS_ROTATE_AXIS_LABEL } from './PRESET_LINE_AREAS_ROTATE_AXIS_LABEL'
16
+ export { PRESET_LINE_AREAS_SEPARATE_SERIES } from './PRESET_LINE_AREAS_SEPARATE_SERIES'
17
+ export { PRESET_LINES_BASIC } from './PRESET_LINES_BASIC'
18
+ export { PRESET_LINES_CURVE } from './PRESET_LINES_CURVE'
19
+ export { PRESET_LINES_HIGHLIGHT_GROUP_DOTS } from './PRESET_LINES_HIGHLIGHT_GROUP_DOTS'
20
+ export { PRESET_LINES_HORIZONTAL } from './PRESET_LINES_HORIZONTAL'
21
+ export { PRESET_LINES_LOOSE_TICKS } from './PRESET_LINES_LOOSE_TICKS'
22
+ export { PRESET_LINES_ROTATE_AXIS_LABEL } from './PRESET_LINES_ROTATE_AXIS_LABEL'
23
23
  export { PRESET_LINES_WITH_SOLID_DOTS } from './PRESET_LINES_WITH_SOLID_DOTS'
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './series'
2
- export * from './grid'
3
- export * from './multiGrid'
4
- export * from './tree'
1
+ export * from './series'
2
+ export * from './grid'
3
+ export * from './multiGrid'
4
+ export * from './tree'
@@ -1,36 +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
- }
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
+ }
@@ -1,85 +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
- }
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
+ }
@@ -1,57 +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
- }
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
+ }