@orbcharts/presets-basic 3.0.1 → 3.0.3

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 (68) hide show
  1. package/dist/orbcharts-presets-basic.es.js +1058 -450
  2. package/dist/orbcharts-presets-basic.umd.js +1 -1
  3. package/dist/src/multiValue/PRESET_ORDINAL_BUBBLES_ALL_ITEMS.d.ts +4 -0
  4. package/dist/src/multiValue/PRESET_ORDINAL_BUBBLES_BASIC.d.ts +4 -0
  5. package/dist/src/multiValue/PRESET_ORDINAL_BUBBLES_LINEAR_OPACITY.d.ts +4 -0
  6. package/dist/src/multiValue/PRESET_ORDINAL_BUBBLES_SCALING_BY_RADIUS.d.ts +4 -0
  7. package/dist/src/multiValue/PRESET_ORDINAL_BUBBLES_SEPARATE_CATEGORY.d.ts +4 -0
  8. package/dist/src/multiValue/PRESET_ORDINAL_BUBBLES_SIMPLE.d.ts +4 -0
  9. package/dist/src/multiValue/index.d.ts +6 -0
  10. package/dist/src/series/PRESET_BUBBLES_SEPARATE_ALL.d.ts +4 -0
  11. package/dist/src/series/PRESET_BUBBLES_SEPARATE_LABEL.d.ts +4 -0
  12. package/dist/src/series/PRESET_PIE_SEPARATE_LABEL.d.ts +4 -0
  13. package/dist/src/series/PRESET_ROSE_SEPARATE_ALL.d.ts +4 -0
  14. package/dist/src/series/PRESET_ROSE_SEPARATE_LABEL.d.ts +4 -0
  15. package/dist/src/series/index.d.ts +5 -0
  16. package/dist/src/types.d.ts +15 -3
  17. package/package.json +3 -3
  18. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +6 -8
  19. package/src/grid/PRESET_BARS_ROUND.ts +0 -2
  20. package/src/grid/PRESET_BARS_THIN.ts +0 -2
  21. package/src/grid/PRESET_GRID_BASIC.ts +0 -5
  22. package/src/grid/PRESET_GRID_HORIZONTAL.ts +6 -19
  23. package/src/grid/PRESET_GRID_PN_SCALE.ts +4 -11
  24. package/src/grid/PRESET_GRID_PN_SCALE_SIMPLE.ts +0 -4
  25. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +1 -6
  26. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +6 -10
  27. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +1 -1
  28. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +2 -2
  29. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +5 -11
  30. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +2 -2
  31. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +2 -2
  32. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +1 -1
  33. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +5 -1
  34. package/src/grid/PRESET_LINE_AREAS_SIMPLE.ts +2 -2
  35. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +1 -1
  36. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING_SIMPLE.ts +1 -1
  37. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE_SIMPLE.ts +4 -0
  38. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +5 -1
  39. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID_SIMPLE.ts +2 -1
  40. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +5 -1
  41. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID_SIMPLE.ts +2 -1
  42. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +5 -5
  43. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID_SIMPLE.ts +4 -3
  44. package/src/multiValue/PRESET_MULTI_VALUE_SEPARATE_CATEGORY.ts +5 -1
  45. package/src/multiValue/PRESET_ORDINAL_BUBBLES_ALL_ITEMS.ts +57 -0
  46. package/src/multiValue/PRESET_ORDINAL_BUBBLES_BASIC.ts +56 -0
  47. package/src/multiValue/PRESET_ORDINAL_BUBBLES_LINEAR_OPACITY.ts +59 -0
  48. package/src/multiValue/PRESET_ORDINAL_BUBBLES_SCALING_BY_RADIUS.ts +59 -0
  49. package/src/multiValue/PRESET_ORDINAL_BUBBLES_SEPARATE_CATEGORY.ts +66 -0
  50. package/src/multiValue/PRESET_ORDINAL_BUBBLES_SIMPLE.ts +59 -0
  51. package/src/multiValue/PRESET_RACING_BARS_SEPARATE_CATEGORY.ts +1 -1
  52. package/src/multiValue/PRESET_SCATTER_BUBBLES_SEPARATE_CATEGORY.ts +5 -1
  53. package/src/multiValue/PRESET_SCATTER_SEPARATE_CATEGORY.ts +5 -1
  54. package/src/multiValue/index.ts +6 -0
  55. package/src/relationship/PRESET_FORCE_DIRECTED_FIX_FONT_SIZE.ts +12 -12
  56. package/src/series/PRESET_BUBBLES_SEPARATE_ALL.ts +69 -0
  57. package/src/series/PRESET_BUBBLES_SEPARATE_LABEL.ts +66 -0
  58. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +13 -5
  59. package/src/series/PRESET_PIE_SEPARATE_LABEL.ts +52 -0
  60. package/src/series/PRESET_ROSE_SEPARATE_ALL.ts +55 -0
  61. package/src/series/PRESET_ROSE_SEPARATE_LABEL.ts +58 -0
  62. package/src/series/PRESET_ROSE_SEPARATE_SERIES.ts +0 -2
  63. package/src/series/PRESET_ROSE_SEPARATE_SERIES_AND_SUM_SERIES.ts +0 -2
  64. package/src/series/index.ts +5 -0
  65. package/src/tree/PRESET_TREE_MAP_BASIC.ts +0 -4
  66. package/src/types.ts +25 -1
  67. package/dist/src/params.d.ts +0 -9
  68. package/src/params.ts +0 -84
@@ -0,0 +1,59 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_ORDINAL_BUBBLES_LINEAR_OPACITY: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_ORDINAL_BUBBLES_LINEAR_OPACITY',
7
+ description: 'Ordinal bubbles with linear opacity',
8
+ descriptionZh: '漸變透明度的序數泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#0088FF",
14
+ "#FF3232",
15
+ "#38BEA8",
16
+ "#6F3BD5",
17
+ "#314285",
18
+ "#42C724",
19
+ "#D52580",
20
+ "#F4721B",
21
+ "#D117EA",
22
+ "#7E7D7D"
23
+ ],
24
+ },
25
+ dark: {
26
+ label: [
27
+ "#4BABFF",
28
+ "#FF6C6C",
29
+ "#7DD3C4",
30
+ "#8E6BC9",
31
+ "#5366AC",
32
+ "#86DC72",
33
+ "#FF72BB",
34
+ "#F9B052",
35
+ "#EF76FF",
36
+ "#C4C4C4"
37
+ ]
38
+ }
39
+ },
40
+ padding: {
41
+ top: 60,
42
+ right: 40,
43
+ bottom: 60,
44
+ left: 160
45
+ },
46
+ },
47
+ pluginParams: {
48
+ OrdinalBubbles: {
49
+ bubble: {
50
+ valueLinearOpacity: [0.5, 1]
51
+ }
52
+ },
53
+ MultiValueLegend: {
54
+ placement: 'bottom',
55
+ padding: 14,
56
+ listRectRadius: 7 // 圓型圖例列點
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,59 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_ORDINAL_BUBBLES_SCALING_BY_RADIUS: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_ORDINAL_BUBBLES_SCALING_BY_RADIUS',
7
+ description: 'Ordinal bubbles with radius scaling',
8
+ descriptionZh: '以半徑尺寸為比例的序數泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#0088FF",
14
+ "#FF3232",
15
+ "#38BEA8",
16
+ "#6F3BD5",
17
+ "#314285",
18
+ "#42C724",
19
+ "#D52580",
20
+ "#F4721B",
21
+ "#D117EA",
22
+ "#7E7D7D"
23
+ ],
24
+ },
25
+ dark: {
26
+ label: [
27
+ "#4BABFF",
28
+ "#FF6C6C",
29
+ "#7DD3C4",
30
+ "#8E6BC9",
31
+ "#5366AC",
32
+ "#86DC72",
33
+ "#FF72BB",
34
+ "#F9B052",
35
+ "#EF76FF",
36
+ "#C4C4C4"
37
+ ]
38
+ }
39
+ },
40
+ padding: {
41
+ top: 60,
42
+ right: 40,
43
+ bottom: 60,
44
+ left: 160
45
+ },
46
+ },
47
+ pluginParams: {
48
+ OrdinalBubbles: {
49
+ bubble: {
50
+ arcScaleType: 'radius',
51
+ }
52
+ },
53
+ MultiValueLegend: {
54
+ placement: 'bottom',
55
+ padding: 14,
56
+ listRectRadius: 7 // 圓型圖例列點
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,66 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_ORDINAL_BUBBLES_SEPARATE_CATEGORY: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_ORDINAL_BUBBLES_SEPARATE_CATEGORY',
7
+ description: 'Ordinal bubbles with separate category',
8
+ descriptionZh: '分開顯示category的序數泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#0088FF",
14
+ "#FF3232",
15
+ "#38BEA8",
16
+ "#6F3BD5",
17
+ "#314285",
18
+ "#42C724",
19
+ "#D52580",
20
+ "#F4721B",
21
+ "#D117EA",
22
+ "#7E7D7D"
23
+ ],
24
+ },
25
+ dark: {
26
+ label: [
27
+ "#4BABFF",
28
+ "#FF6C6C",
29
+ "#7DD3C4",
30
+ "#8E6BC9",
31
+ "#5366AC",
32
+ "#86DC72",
33
+ "#FF72BB",
34
+ "#F9B052",
35
+ "#EF76FF",
36
+ "#C4C4C4"
37
+ ]
38
+ }
39
+ },
40
+ padding: {
41
+ top: 60,
42
+ right: 40,
43
+ bottom: 60,
44
+ left: 140
45
+ },
46
+ },
47
+ dataFormatter: {
48
+ separateCategory: true,
49
+ container: {
50
+ columnGap: 140,
51
+ rowGap: 60
52
+ }
53
+ },
54
+ pluginParams: {
55
+ OrdinalBubbles: {
56
+ },
57
+ OrdinalAxis: {
58
+ ticks: 2,
59
+ },
60
+ MultiValueLegend: {
61
+ placement: 'bottom',
62
+ padding: 14,
63
+ listRectRadius: 7 // 圓型圖例列點
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,59 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_ORDINAL_BUBBLES_SIMPLE: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_ORDINAL_BUBBLES_SIMPLE',
7
+ description: 'Simple ordinal bubbles',
8
+ descriptionZh: '簡單的序數泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#0088FF",
14
+ "#FF3232",
15
+ "#38BEA8",
16
+ "#6F3BD5",
17
+ "#314285",
18
+ "#42C724",
19
+ "#D52580",
20
+ "#F4721B",
21
+ "#D117EA",
22
+ "#7E7D7D"
23
+ ],
24
+ },
25
+ dark: {
26
+ label: [
27
+ "#4BABFF",
28
+ "#FF6C6C",
29
+ "#7DD3C4",
30
+ "#8E6BC9",
31
+ "#5366AC",
32
+ "#86DC72",
33
+ "#FF72BB",
34
+ "#F9B052",
35
+ "#EF76FF",
36
+ "#C4C4C4"
37
+ ]
38
+ }
39
+ },
40
+ padding: {
41
+ top: 60,
42
+ right: 40,
43
+ bottom: 60,
44
+ left: 140
45
+ },
46
+ },
47
+ pluginParams: {
48
+ OrdinalBubbles: {
49
+ },
50
+ OrdinalAxis: {
51
+ ticks: 2,
52
+ },
53
+ MultiValueLegend: {
54
+ placement: 'bottom',
55
+ padding: 7,
56
+ listRectRadius: 7 // 圓型圖例列點
57
+ }
58
+ }
59
+ }
@@ -48,7 +48,7 @@ export const PRESET_RACING_BARS_SEPARATE_CATEGORY: PresetPartial<'multiValue', P
48
48
  dataFormatter: {
49
49
  separateCategory: true,
50
50
  container: {
51
- gap:80
51
+ rowGap: 60
52
52
  },
53
53
  },
54
54
  pluginParams: {
@@ -45,7 +45,11 @@ export const PRESET_SCATTER_BUBBLES_SEPARATE_CATEGORY: PresetPartial<'multiValue
45
45
  },
46
46
  },
47
47
  dataFormatter: {
48
- separateCategory: true
48
+ separateCategory: true,
49
+ container: {
50
+ columnGap: 100,
51
+ rowGap: 70
52
+ }
49
53
  },
50
54
  pluginParams: {
51
55
  MultiValueLegend: {
@@ -45,7 +45,11 @@ export const PRESET_SCATTER_SEPARATE_CATEGORY: PresetPartial<'multiValue', Parti
45
45
  },
46
46
  },
47
47
  dataFormatter: {
48
- separateCategory: true
48
+ separateCategory: true,
49
+ container: {
50
+ columnGap: 100,
51
+ rowGap: 70
52
+ }
49
53
  },
50
54
  pluginParams: {
51
55
  XYAxes: {
@@ -1,6 +1,12 @@
1
1
  export { PRESET_MULTI_VALUE_BASIC } from './PRESET_MULTI_VALUE_BASIC'
2
2
  export { PRESET_MULTI_VALUE_SEPARATE_CATEGORY } from './PRESET_MULTI_VALUE_SEPARATE_CATEGORY'
3
3
  export { PRESET_MULTI_VALUE_SIMPLE } from './PRESET_MULTI_VALUE_SIMPLE'
4
+ export { PRESET_ORDINAL_BUBBLES_ALL_ITEMS } from './PRESET_ORDINAL_BUBBLES_ALL_ITEMS'
5
+ export { PRESET_ORDINAL_BUBBLES_BASIC } from './PRESET_ORDINAL_BUBBLES_BASIC'
6
+ export { PRESET_ORDINAL_BUBBLES_LINEAR_OPACITY } from './PRESET_ORDINAL_BUBBLES_LINEAR_OPACITY'
7
+ export { PRESET_ORDINAL_BUBBLES_SCALING_BY_RADIUS } from './PRESET_ORDINAL_BUBBLES_SCALING_BY_RADIUS'
8
+ export { PRESET_ORDINAL_BUBBLES_SEPARATE_CATEGORY } from './PRESET_ORDINAL_BUBBLES_SEPARATE_CATEGORY'
9
+ export { PRESET_ORDINAL_BUBBLES_SIMPLE } from './PRESET_ORDINAL_BUBBLES_SIMPLE'
4
10
  export { PRESET_RACING_BARS_ALL_ITEMS } from './PRESET_RACING_BARS_ALL_ITEMS'
5
11
  export { PRESET_RACING_BARS_BASIC } from './PRESET_RACING_BARS_BASIC'
6
12
  export { PRESET_RACING_BARS_FAST } from './PRESET_RACING_BARS_FAST'
@@ -10,16 +10,16 @@ export const PRESET_FORCE_DIRECTED_FIX_FONT_SIZE: PresetPartial<'relationship',
10
10
  colors: {
11
11
  light: {
12
12
  label: [
13
- "#4BABFF",
14
- "#FFA0A0",
15
- "#7DD3C4",
13
+ "#0088FF",
14
+ "#FF72BB",
15
+ "#16B59B",
16
16
  "#F9B052",
17
- "#8454D4",
17
+ "#6F3BD5",
18
18
  "#42C724",
19
- "#FF4B4B",
19
+ "#FF3232",
20
20
  "#904026",
21
- "#4B25B3",
22
- "#C50669"
21
+ "#1F3172",
22
+ "#E23D93"
23
23
  ],
24
24
  },
25
25
  dark: {
@@ -27,13 +27,13 @@ export const PRESET_FORCE_DIRECTED_FIX_FONT_SIZE: PresetPartial<'relationship',
27
27
  "#4BABFF",
28
28
  "#FFA0A0",
29
29
  "#7DD3C4",
30
- "#F9B052",
30
+ "#FAC77D",
31
31
  "#8454D4",
32
32
  "#42C724",
33
- "#FF4B4B",
34
- "#904026",
35
- "#4B25B3",
36
- "#C50669"
33
+ "#FF6C6C",
34
+ "#D4785A",
35
+ "#5366AC",
36
+ "#FF8DC8"
37
37
  ]
38
38
  }
39
39
  },
@@ -0,0 +1,69 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_BUBBLES_SEPARATE_ALL: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_BUBBLES_SEPARATE_ALL',
7
+ description: 'Bubble chart showing all data separately',
8
+ descriptionZh: '全部資料分開顯示的泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#0088FF",
14
+ "#FF3232",
15
+ "#38BEA8",
16
+ "#6F3BD5",
17
+ "#314285",
18
+ "#42C724",
19
+ "#D52580",
20
+ "#F4721B",
21
+ "#D117EA",
22
+ "#7E7D7D"
23
+ ],
24
+ },
25
+ dark: {
26
+ label: [
27
+ "#4BABFF",
28
+ "#FF6C6C",
29
+ "#7DD3C4",
30
+ "#8E6BC9",
31
+ "#5366AC",
32
+ "#86DC72",
33
+ "#FF72BB",
34
+ "#F9B052",
35
+ "#EF76FF",
36
+ "#C4C4C4"
37
+ ]
38
+ }
39
+ },
40
+ // 加長留空
41
+ padding: {
42
+ top: 100,
43
+ right: 160,
44
+ bottom: 100,
45
+ left: 160
46
+ },
47
+ },
48
+ dataFormatter: {
49
+ separateSeries: true,
50
+ separateLabel: true,
51
+ sort: (a, b) => b.value - a.value,
52
+ container: {
53
+ columnGap: 0,
54
+ rowGap: 0
55
+ }
56
+ },
57
+ pluginParams: {
58
+ Bubbles: {
59
+ force: {
60
+ strength: 0.12,
61
+ }
62
+ },
63
+ SeriesLegend: {
64
+ listRectRadius: 7, // 圓型圖例列點
65
+ padding: 7
66
+ },
67
+ SeriesTooltip: {}
68
+ }
69
+ }
@@ -0,0 +1,66 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_BUBBLES_SEPARATE_LABEL: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_BUBBLES_SEPARATE_LABEL',
7
+ description: 'Bubble chart showing label separately',
8
+ descriptionZh: '分開顯示Label的泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#0088FF",
14
+ "#FF3232",
15
+ "#38BEA8",
16
+ "#6F3BD5",
17
+ "#314285",
18
+ "#42C724",
19
+ "#D52580",
20
+ "#F4721B",
21
+ "#D117EA",
22
+ "#7E7D7D"
23
+ ],
24
+ },
25
+ dark: {
26
+ label: [
27
+ "#4BABFF",
28
+ "#FF6C6C",
29
+ "#7DD3C4",
30
+ "#8E6BC9",
31
+ "#5366AC",
32
+ "#86DC72",
33
+ "#FF72BB",
34
+ "#F9B052",
35
+ "#EF76FF",
36
+ "#C4C4C4"
37
+ ]
38
+ }
39
+ },
40
+ // 加長留空
41
+ padding: {
42
+ top: 100,
43
+ right: 140,
44
+ bottom: 100,
45
+ left: 140
46
+ },
47
+ },
48
+ dataFormatter: {
49
+ separateLabel: true,
50
+ container: {
51
+ columnGap: 0,
52
+ rowGap: 0
53
+ }
54
+ },
55
+ pluginParams: {
56
+ Bubbles: {
57
+ force: {
58
+ strength: 0.1,
59
+ }
60
+ },
61
+ SeriesLegend: {
62
+ listRectRadius: 7 // 圓型圖例列點
63
+ },
64
+ SeriesTooltip: {}
65
+ }
66
+ }
@@ -39,17 +39,25 @@ export const PRESET_BUBBLES_SEPARATE_SERIES: PresetPartial<'series', Partial<Pre
39
39
  },
40
40
  // 加長留空
41
41
  padding: {
42
- top: 160,
43
- right: 160,
44
- bottom: 160,
45
- left: 160
42
+ top: 100,
43
+ right: 140,
44
+ bottom: 100,
45
+ left: 140
46
46
  },
47
47
  },
48
48
  dataFormatter: {
49
49
  separateSeries: true,
50
+ container: {
51
+ columnGap: 0,
52
+ rowGap: 0
53
+ }
50
54
  },
51
55
  pluginParams: {
52
- Bubbles: {},
56
+ Bubbles: {
57
+ force: {
58
+ strength: 0.1,
59
+ }
60
+ },
53
61
  SeriesLegend: {
54
62
  listRectRadius: 7 // 圓型圖例列點
55
63
  },
@@ -0,0 +1,52 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_PIE_SEPARATE_LABEL: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_PIE_SEPARATE_LABEL',
7
+ description: 'Separate pie chart of Label',
8
+ descriptionZh: '分開顯示Label的圓餅圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#0088FF",
14
+ "#4BABFF",
15
+ "#38BEA8",
16
+ "#86DC72",
17
+ "#F9B052",
18
+ "#F4721B",
19
+ "#FF3232",
20
+ "#5F2714",
21
+ "#D117EA",
22
+ "7E7D7D"
23
+ ],
24
+ },
25
+ dark: {
26
+ label: [
27
+ "#4BABFF",
28
+ "#8BC8FF",
29
+ "#61CBB9",
30
+ "#ACE1A0",
31
+ "#FCDCAD",
32
+ "#F9B052",
33
+ "#FF6C6C",
34
+ "#904026",
35
+ "#EF76FF",
36
+ "#C4C4C4"
37
+ ]
38
+ }
39
+ },
40
+ },
41
+ dataFormatter: {
42
+ sort: (a, b) => b.value - a.value,
43
+ separateLabel: true,
44
+ },
45
+ pluginParams: {
46
+ PieLabels: {
47
+ labelFn: d => d.seriesLabel
48
+ }
49
+ }
50
+ }
51
+ PRESET_PIE_SEPARATE_LABEL.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
52
+ PRESET_PIE_SEPARATE_LABEL.pluginParams.PieLabels.labelFn.toString = () => `d => d.seriesLabel`
@@ -0,0 +1,55 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_ROSE_SEPARATE_ALL: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_ROSE_SEPARATE_ALL',
7
+ description: 'Separate rose chart of all data',
8
+ descriptionZh: '全部資料分開顯示的玫瑰圖',
9
+ chartParams: {
10
+ padding: {
11
+ top: 40,
12
+ right: 40,
13
+ bottom: 40,
14
+ left: 40
15
+ },
16
+ colors: {
17
+ light: {
18
+ label: [
19
+ "#4BABFF",
20
+ "#0088FF",
21
+ "#435399",
22
+ "#86DC72",
23
+ "#42C724",
24
+ "#16B59B",
25
+ "#F9B052",
26
+ "#F4721B",
27
+ "#FF3232",
28
+ "#7E7D7D"
29
+ ]
30
+ },
31
+ dark: {
32
+ label: [
33
+ "#8BC8FF",
34
+ "#4BABFF",
35
+ "#0088FF",
36
+ "#55D339",
37
+ "#29AB0C",
38
+ "#16B59B",
39
+ "#FCDCAD",
40
+ "#F9B052",
41
+ "#FF6C6C",
42
+ "#C4C4C4"
43
+ ]
44
+ }
45
+ }
46
+ },
47
+ dataFormatter: {
48
+ sort: (a, b) => b.value - a.value,
49
+ separateLabel: true,
50
+ separateSeries: true,
51
+ },
52
+ pluginParams: {
53
+ }
54
+ }
55
+ PRESET_ROSE_SEPARATE_ALL.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -0,0 +1,58 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_ROSE_SEPARATE_LABEL: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_ROSE_SEPARATE_LABEL',
7
+ description: 'Separate rose chart of Label',
8
+ descriptionZh: '分開顯示Label的玫瑰圖',
9
+ chartParams: {
10
+ padding: {
11
+ top: 40,
12
+ right: 40,
13
+ bottom: 40,
14
+ left: 40
15
+ },
16
+ colors: {
17
+ light: {
18
+ label: [
19
+ "#4BABFF",
20
+ "#0088FF",
21
+ "#435399",
22
+ "#86DC72",
23
+ "#42C724",
24
+ "#16B59B",
25
+ "#F9B052",
26
+ "#F4721B",
27
+ "#FF3232",
28
+ "#7E7D7D"
29
+ ]
30
+ },
31
+ dark: {
32
+ label: [
33
+ "#8BC8FF",
34
+ "#4BABFF",
35
+ "#0088FF",
36
+ "#55D339",
37
+ "#29AB0C",
38
+ "#16B59B",
39
+ "#FCDCAD",
40
+ "#F9B052",
41
+ "#FF6C6C",
42
+ "#C4C4C4"
43
+ ]
44
+ }
45
+ }
46
+ },
47
+ dataFormatter: {
48
+ sort: (a, b) => b.value - a.value,
49
+ separateLabel: true,
50
+ },
51
+ pluginParams: {
52
+ RoseLabels: {
53
+ labelFn: d => d.seriesLabel,
54
+ }
55
+ }
56
+ }
57
+ PRESET_ROSE_SEPARATE_LABEL.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
58
+ PRESET_ROSE_SEPARATE_LABEL.pluginParams.RoseLabels.labelFn.toString = () => `d => d.seriesLabel`
@@ -49,8 +49,6 @@ export const PRESET_ROSE_SEPARATE_SERIES: PresetPartial<'series', Partial<Preset
49
49
  separateSeries: true,
50
50
  },
51
51
  pluginParams: {
52
- // ...ALL_PLUGIN_PARAMS_SERIES,
53
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
54
52
  }
55
53
  }
56
54
  PRESET_ROSE_SEPARATE_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -50,8 +50,6 @@ export const PRESET_ROSE_SEPARATE_SERIES_AND_SUM_SERIES: PresetPartial<'series',
50
50
  sumSeries: true,
51
51
  },
52
52
  pluginParams: {
53
- // ...ALL_PLUGIN_PARAMS_SERIES,
54
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
55
53
  }
56
54
  }
57
55
  PRESET_ROSE_SEPARATE_SERIES_AND_SUM_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`