@orbcharts/presets-basic 3.0.0-beta.11 → 3.0.0-beta.13

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 (147) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-presets-basic.es.js +1985 -644
  3. package/dist/orbcharts-presets-basic.umd.js +1 -1
  4. package/dist/src/grid/PRESET_GRID_PN_SCALE_SIMPLE.d.ts +4 -0
  5. package/dist/src/grid/PRESET_GRID_SIMPLE.d.ts +4 -0
  6. package/dist/src/grid/PRESET_LINES_SIMPLE.d.ts +4 -0
  7. package/dist/src/grid/PRESET_LINE_AREAS_SIMPLE.d.ts +4 -0
  8. package/dist/src/grid/index.d.ts +4 -0
  9. package/dist/src/multiGrid/PRESET_MULTI_GRID_DIVERGING_SIMPLE.d.ts +4 -0
  10. package/dist/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.d.ts +3 -1
  11. package/dist/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE_SIMPLE.d.ts +6 -0
  12. package/dist/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID_SIMPLE.d.ts +4 -0
  13. package/dist/src/multiGrid/PRESET_MULTI_GRID_SIMPLE.d.ts +4 -0
  14. package/dist/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID_SIMPLE.d.ts +4 -0
  15. package/dist/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID_SIMPLE.d.ts +4 -0
  16. package/dist/src/multiGrid/index.d.ts +6 -0
  17. package/dist/src/multiValue/PRESET_MULTI_VALUE_SIMPLE.d.ts +4 -0
  18. package/dist/src/multiValue/PRESET_RACING_BARS_ALL_ITEMS.d.ts +4 -0
  19. package/dist/src/multiValue/PRESET_RACING_BARS_BASIC.d.ts +4 -0
  20. package/dist/src/multiValue/PRESET_RACING_BARS_FAST.d.ts +4 -0
  21. package/dist/src/multiValue/PRESET_RACING_BARS_FASTER.d.ts +4 -0
  22. package/dist/src/multiValue/PRESET_RACING_BARS_LOOP.d.ts +4 -0
  23. package/dist/src/multiValue/PRESET_RACING_BARS_OUTSIDE_LABELS.d.ts +4 -0
  24. package/dist/src/multiValue/PRESET_RACING_BARS_SEPARATE_CATEGORY.d.ts +4 -0
  25. package/dist/src/multiValue/PRESET_RACING_BARS_SIMPLE.d.ts +4 -0
  26. package/dist/src/multiValue/PRESET_RACING_BARS_STOP.d.ts +4 -0
  27. package/dist/src/multiValue/PRESET_SCATTER_BUBBLES_SIMPLE.d.ts +4 -0
  28. package/dist/src/multiValue/PRESET_SCATTER_SIMPLE.d.ts +4 -0
  29. package/dist/src/multiValue/index.d.ts +13 -1
  30. package/dist/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_SIMPLE.d.ts +4 -0
  31. package/dist/src/relationship/PRESET_FORCE_DIRECTED_SIMPLE.d.ts +4 -0
  32. package/dist/src/relationship/index.d.ts +2 -0
  33. package/dist/src/series/PRESET_BUBBLES_SIMPLE.d.ts +4 -0
  34. package/dist/src/series/PRESET_PIE_SIMPLE.d.ts +4 -0
  35. package/dist/src/series/PRESET_ROSE_SIMPLE.d.ts +4 -0
  36. package/dist/src/series/index.d.ts +3 -0
  37. package/dist/src/tree/PRESET_TREE_MAP_SIMPLE.d.ts +4 -0
  38. package/dist/src/tree/index.d.ts +1 -0
  39. package/dist/src/types.d.ts +23 -17
  40. package/lib/core-types.ts +7 -7
  41. package/lib/plugins-basic-types.ts +6 -6
  42. package/package.json +42 -42
  43. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +60 -72
  44. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +61 -68
  45. package/src/grid/PRESET_BARS_ROUND.ts +56 -55
  46. package/src/grid/PRESET_BARS_THIN.ts +53 -52
  47. package/src/grid/PRESET_GRID_BASIC.ts +44 -43
  48. package/src/grid/PRESET_GRID_HORIZONTAL.ts +61 -60
  49. package/src/grid/PRESET_GRID_PN_SCALE.ts +52 -51
  50. package/src/grid/PRESET_GRID_PN_SCALE_SIMPLE.ts +49 -0
  51. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +52 -51
  52. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +57 -56
  53. package/src/grid/PRESET_GRID_SIMPLE.ts +44 -0
  54. package/src/grid/PRESET_LINES_BASIC.ts +48 -51
  55. package/src/grid/PRESET_LINES_CURVE.ts +51 -54
  56. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +50 -53
  57. package/src/grid/PRESET_LINES_HORIZONTAL.ts +56 -67
  58. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +50 -53
  59. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +53 -56
  60. package/src/grid/PRESET_LINES_SIMPLE.ts +53 -0
  61. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +52 -55
  62. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +54 -59
  63. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +65 -64
  64. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +58 -63
  65. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +58 -63
  66. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +56 -61
  67. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +59 -64
  68. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +60 -66
  69. package/src/grid/PRESET_LINE_AREAS_SIMPLE.ts +57 -0
  70. package/src/grid/index.ts +26 -22
  71. package/src/index.ts +6 -6
  72. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +50 -54
  73. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +98 -102
  74. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING_SIMPLE.ts +101 -0
  75. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +71 -74
  76. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE_SIMPLE.ts +81 -0
  77. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +73 -76
  78. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID_SIMPLE.ts +84 -0
  79. package/src/multiGrid/PRESET_MULTI_GRID_SIMPLE.ts +60 -0
  80. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +101 -102
  81. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID_SIMPLE.ts +110 -0
  82. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +119 -120
  83. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID_SIMPLE.ts +113 -0
  84. package/src/multiGrid/index.ts +12 -6
  85. package/src/multiValue/PRESET_MULTI_VALUE_BASIC.ts +39 -39
  86. package/src/multiValue/PRESET_MULTI_VALUE_SEPARATE_CATEGORY.ts +50 -42
  87. package/src/multiValue/PRESET_MULTI_VALUE_SIMPLE.ts +39 -0
  88. package/src/multiValue/PRESET_RACING_BARS_ALL_ITEMS.ts +44 -0
  89. package/src/multiValue/PRESET_RACING_BARS_BASIC.ts +43 -0
  90. package/src/multiValue/PRESET_RACING_BARS_FAST.ts +43 -0
  91. package/src/multiValue/PRESET_RACING_BARS_FASTER.ts +43 -0
  92. package/src/multiValue/PRESET_RACING_BARS_LOOP.ts +44 -0
  93. package/src/multiValue/PRESET_RACING_BARS_OUTSIDE_LABELS.ts +47 -0
  94. package/src/multiValue/PRESET_RACING_BARS_SEPARATE_CATEGORY.ts +60 -0
  95. package/src/multiValue/PRESET_RACING_BARS_SIMPLE.ts +43 -0
  96. package/src/multiValue/PRESET_RACING_BARS_STOP.ts +42 -0
  97. package/src/multiValue/PRESET_SCATTER_BASIC.ts +40 -39
  98. package/src/multiValue/PRESET_SCATTER_BUBBLES_BASIC.ts +40 -39
  99. package/src/multiValue/PRESET_SCATTER_BUBBLES_LINEAR_OPACITY.ts +43 -42
  100. package/src/multiValue/PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS.ts +43 -42
  101. package/src/multiValue/PRESET_SCATTER_BUBBLES_SEPARATE_CATEGORY.ts +43 -42
  102. package/src/multiValue/PRESET_SCATTER_BUBBLES_SIMPLE.ts +40 -0
  103. package/src/multiValue/PRESET_SCATTER_SEPARATE_CATEGORY.ts +51 -42
  104. package/src/multiValue/PRESET_SCATTER_SIMPLE.ts +40 -0
  105. package/src/multiValue/index.ts +20 -8
  106. package/src/params.ts +83 -80
  107. package/src/relationship/PRESET_FORCE_DIRECTED_BASIC.ts +33 -39
  108. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_BASIC.ts +33 -39
  109. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_FIX_ARROW_WIDTH.ts +38 -44
  110. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_NONE_ARROW.ts +38 -46
  111. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_NONE_ZOOM.ts +35 -41
  112. package/src/relationship/PRESET_FORCE_DIRECTED_BUBBLES_SIMPLE.ts +34 -0
  113. package/src/relationship/PRESET_FORCE_DIRECTED_FIX_FONT_SIZE.ts +40 -46
  114. package/src/relationship/PRESET_FORCE_DIRECTED_NONE_ARROW.ts +38 -44
  115. package/src/relationship/PRESET_FORCE_DIRECTED_NONE_ZOOM.ts +35 -41
  116. package/src/relationship/PRESET_FORCE_DIRECTED_SIMPLE.ts +34 -0
  117. package/src/relationship/index.ts +10 -8
  118. package/src/series/PRESET_BUBBLES_BASIC.ts +32 -34
  119. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +35 -36
  120. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +44 -45
  121. package/src/series/PRESET_BUBBLES_SIMPLE.ts +39 -0
  122. package/src/series/PRESET_BUBBLES_SUM_SERIES.ts +34 -36
  123. package/src/series/PRESET_PIE_BASIC.ts +35 -36
  124. package/src/series/PRESET_PIE_DONUT.ts +40 -41
  125. package/src/series/PRESET_PIE_HALF_DONUT.ts +52 -53
  126. package/src/series/PRESET_PIE_SEPARATE_SERIES.ts +33 -35
  127. package/src/series/PRESET_PIE_SIMPLE.ts +43 -0
  128. package/src/series/PRESET_PIE_SUM_SERIES.ts +34 -36
  129. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +41 -42
  130. package/src/series/PRESET_ROSE_BASIC.ts +41 -37
  131. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +47 -42
  132. package/src/series/PRESET_ROSE_SEPARATE_SERIES.ts +41 -35
  133. package/src/series/PRESET_ROSE_SEPARATE_SERIES_AND_SUM_SERIES.ts +42 -36
  134. package/src/series/PRESET_ROSE_SIMPLE.ts +43 -0
  135. package/src/series/PRESET_ROSE_SUM_SERIES.ts +40 -36
  136. package/src/series/PRESET_SERIES_BASIC.ts +32 -34
  137. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +15 -17
  138. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +16 -18
  139. package/src/series/PRESET_SERIES_SUM_SERIES.ts +17 -18
  140. package/src/series/index.ts +23 -20
  141. package/src/tree/PRESET_TREE_MAP_BASIC.ts +44 -43
  142. package/src/tree/PRESET_TREE_MAP_SIMPLE.ts +40 -0
  143. package/src/tree/index.ts +2 -1
  144. package/src/types.ts +368 -349
  145. package/tsconfig.base.json +13 -13
  146. package/tsconfig.json +2 -2
  147. package/vite.config.js +22 -22
@@ -1,36 +1,35 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetBubblesParams, PresetSeriesLegendParams, PresetSeriesTooltipParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_BUBBLES_SCALING_BY_RADIUS: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_BUBBLES_SCALING_BY_RADIUS',
8
- description: '以半徑尺寸為比例的泡泡圖',
9
- chartParams: {
10
- colors: {
11
- light: {
12
- label: [
13
- "#6CBAFF",
14
- "#FF6C6C",
15
- "#F9B052",
16
- "#7DD3C4",
17
- "#AA93D2",
18
- "#0088FF",
19
- "#FFBABA",
20
- "#86DC72",
21
- "#EF76FF",
22
- "#C4C4C4"
23
- ],
24
- }
25
- }
26
- },
27
- allPluginParams: {
28
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
29
- Bubbles: {
30
- arcScaleType: 'radius'
31
- },
32
- SeriesLegend: {
33
- listRectRadius: 7 // 圓型圖例列點
34
- },
35
- },
36
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetBubblesParams, PresetSeriesLegendParams, PresetSeriesTooltipParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_BUBBLES_SCALING_BY_RADIUS: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_BUBBLES_SCALING_BY_RADIUS',
7
+ description: 'Bubble chart scaled by radius size',
8
+ descriptionZh: '以半徑尺寸為比例的泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#6CBAFF",
14
+ "#FF6C6C",
15
+ "#F9B052",
16
+ "#7DD3C4",
17
+ "#AA93D2",
18
+ "#0088FF",
19
+ "#FFBABA",
20
+ "#86DC72",
21
+ "#EF76FF",
22
+ "#C4C4C4"
23
+ ],
24
+ }
25
+ }
26
+ },
27
+ pluginParams: {
28
+ Bubbles: {
29
+ arcScaleType: 'radius'
30
+ },
31
+ SeriesLegend: {
32
+ listRectRadius: 7 // 圓型圖例列點
33
+ },
34
+ },
35
+ }
@@ -1,45 +1,44 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_BUBBLES_SEPARATE_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_BUBBLES_SEPARATE_SERIES',
8
- description: '分開顯示Series的泡泡圖',
9
- chartParams: {
10
- colors: {
11
- light: {
12
- label: [
13
- "#6CBAFF",
14
- "#FF6C6C",
15
- "#F9B052",
16
- "#7DD3C4",
17
- "#AA93D2",
18
- "#0088FF",
19
- "#FFBABA",
20
- "#86DC72",
21
- "#EF76FF",
22
- "#C4C4C4"
23
- ],
24
- }
25
- },
26
- // 加長留空
27
- padding: {
28
- top: 160,
29
- right: 160,
30
- bottom: 160,
31
- left: 160
32
- },
33
- },
34
- dataFormatter: {
35
- separateSeries: true,
36
- },
37
- allPluginParams: {
38
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
39
- Bubbles: {},
40
- SeriesLegend: {
41
- listRectRadius: 7 // 圓型圖例列點
42
- },
43
- SeriesTooltip: {}
44
- }
45
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_BUBBLES_SEPARATE_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_BUBBLES_SEPARATE_SERIES',
7
+ description: 'Bubble chart showing series separately',
8
+ descriptionZh: '分開顯示Series的泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#6CBAFF",
14
+ "#FF6C6C",
15
+ "#F9B052",
16
+ "#7DD3C4",
17
+ "#AA93D2",
18
+ "#0088FF",
19
+ "#FFBABA",
20
+ "#86DC72",
21
+ "#EF76FF",
22
+ "#C4C4C4"
23
+ ],
24
+ }
25
+ },
26
+ // 加長留空
27
+ padding: {
28
+ top: 160,
29
+ right: 160,
30
+ bottom: 160,
31
+ left: 160
32
+ },
33
+ },
34
+ dataFormatter: {
35
+ separateSeries: true,
36
+ },
37
+ pluginParams: {
38
+ Bubbles: {},
39
+ SeriesLegend: {
40
+ listRectRadius: 7 // 圓型圖例列點
41
+ },
42
+ SeriesTooltip: {}
43
+ }
44
+ }
@@ -0,0 +1,39 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_BUBBLES_SIMPLE: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_BUBBLES_SIMPLE',
7
+ description: 'Simple bubble chart',
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
+ "#6CBAFF",
20
+ "#FF6C6C",
21
+ "#F9B052",
22
+ "#7DD3C4",
23
+ "#AA93D2",
24
+ "#0088FF",
25
+ "#FFBABA",
26
+ "#86DC72",
27
+ "#EF76FF",
28
+ "#C4C4C4"
29
+ ],
30
+ }
31
+ }
32
+ },
33
+ pluginParams: {
34
+ SeriesLegend: {
35
+ listRectRadius: 7, // 圓型圖例列點
36
+ padding: 7
37
+ }
38
+ }
39
+ }
@@ -1,36 +1,34 @@
1
- import type { PresetPartial } from '../../lib/core-types'
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_BUBBLES_SUM_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_BUBBLES_SUM_SERIES',
8
- description: '合併Series資料的泡泡圖',
9
- chartParams: {
10
- colors: {
11
- light: {
12
- label: [
13
- "#6CBAFF",
14
- "#FF6C6C",
15
- "#F9B052",
16
- "#7DD3C4",
17
- "#AA93D2",
18
- "#0088FF",
19
- "#FFBABA",
20
- "#86DC72",
21
- "#EF76FF",
22
- "#C4C4C4"
23
- ],
24
- }
25
- }
26
- },
27
- dataFormatter: {
28
- sort: (a, b) => b.value - a.value,
29
- sumSeries: true
30
- },
31
- allPluginParams: {
32
- // ...ALL_PLUGIN_PARAMS_SERIES,
33
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
34
- }
35
- }
36
- PRESET_BUBBLES_SUM_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_BUBBLES_SUM_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_BUBBLES_SUM_SERIES',
7
+ description: 'Bubble chart of combined Series data',
8
+ descriptionZh: '合併Series資料的泡泡圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#6CBAFF",
14
+ "#FF6C6C",
15
+ "#F9B052",
16
+ "#7DD3C4",
17
+ "#AA93D2",
18
+ "#0088FF",
19
+ "#FFBABA",
20
+ "#86DC72",
21
+ "#EF76FF",
22
+ "#C4C4C4"
23
+ ],
24
+ }
25
+ }
26
+ },
27
+ dataFormatter: {
28
+ sort: (a, b) => b.value - a.value,
29
+ sumSeries: true
30
+ },
31
+ pluginParams: {
32
+ }
33
+ }
34
+ PRESET_BUBBLES_SUM_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,37 +1,36 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetSeriesTooltipParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_SERIES, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_PIE_BASIC: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_PIE_BASIC',
8
- description: '基本圓餅圖',
9
- chartParams: {
10
- colors: {
11
- light: {
12
- label: [
13
- "#7DD3C4",
14
- "#FFA0A0",
15
- "#6CBAFF",
16
- "#55D339",
17
- "#F9B052",
18
- "#FF6C6C",
19
- "#8E6BC9",
20
- "#0088FF",
21
- "#904026",
22
- "#C4C4C4"
23
- ],
24
- }
25
- }
26
- },
27
- dataFormatter: {
28
- sort: (a, b) => b.value - a.value
29
- },
30
- allPluginParams: {
31
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
32
- SeriesLegend: {
33
- listRectRadius: 7 // 圓型圖例列點
34
- }
35
- }
36
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetSeriesTooltipParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_PIE_BASIC: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_PIE_BASIC',
7
+ description: 'Basic pie chart',
8
+ descriptionZh: '基本圓餅圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#7DD3C4",
14
+ "#FFA0A0",
15
+ "#6CBAFF",
16
+ "#55D339",
17
+ "#F9B052",
18
+ "#FF6C6C",
19
+ "#8E6BC9",
20
+ "#0088FF",
21
+ "#904026",
22
+ "#C4C4C4"
23
+ ],
24
+ }
25
+ }
26
+ },
27
+ dataFormatter: {
28
+ sort: (a, b) => b.value - a.value
29
+ },
30
+ pluginParams: {
31
+ SeriesLegend: {
32
+ listRectRadius: 7 // 圓型圖例列點
33
+ }
34
+ }
35
+ }
37
36
  PRESET_PIE_BASIC.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,42 +1,41 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_PIE_DONUT: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_PIE_DONUT',
8
- description: '甜甜圈圖',
9
- chartParams: {
10
- colors: {
11
- light: {
12
- label: [
13
- "#7DD3C4",
14
- "#FFA0A0",
15
- "#6CBAFF",
16
- "#55D339",
17
- "#F9B052",
18
- "#FF6C6C",
19
- "#8E6BC9",
20
- "#0088FF",
21
- "#904026",
22
- "#C4C4C4"
23
- ],
24
- }
25
- }
26
- },
27
- dataFormatter: {
28
- sort: (a, b) => b.value - a.value
29
- },
30
- allPluginParams: {
31
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
32
- Pie: {
33
- innerRadius: 0.5
34
- },
35
- PieLabels: {},
36
- PieEventTexts: {},
37
- SeriesLegend: {
38
- listRectRadius: 7 // 圓型圖例列點
39
- }
40
- }
41
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_PIE_DONUT: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_PIE_DONUT',
7
+ description: 'Donut chart',
8
+ descriptionZh: '甜甜圈圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#7DD3C4",
14
+ "#FFA0A0",
15
+ "#6CBAFF",
16
+ "#55D339",
17
+ "#F9B052",
18
+ "#FF6C6C",
19
+ "#8E6BC9",
20
+ "#0088FF",
21
+ "#904026",
22
+ "#C4C4C4"
23
+ ],
24
+ }
25
+ }
26
+ },
27
+ dataFormatter: {
28
+ sort: (a, b) => b.value - a.value
29
+ },
30
+ pluginParams: {
31
+ Pie: {
32
+ innerRadius: 0.5
33
+ },
34
+ PieLabels: {},
35
+ PieEventTexts: {},
36
+ SeriesLegend: {
37
+ listRectRadius: 7 // 圓型圖例列點
38
+ }
39
+ }
40
+ }
42
41
  PRESET_PIE_DONUT.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,54 +1,53 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_PIE_HALF_DONUT: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_PIE_HALF_DONUT',
8
- description: '半圓甜甜圈圖',
9
- chartParams: {
10
- colors: {
11
- light: {
12
- label: [
13
- "#7DD3C4",
14
- "#FFA0A0",
15
- "#6CBAFF",
16
- "#55D339",
17
- "#F9B052",
18
- "#FF6C6C",
19
- "#8E6BC9",
20
- "#0088FF",
21
- "#904026",
22
- "#C4C4C4"
23
- ],
24
- }
25
- },
26
- padding: {
27
- top: 120,
28
- right: 60,
29
- bottom: 0,
30
- left: 60
31
- },
32
- },
33
- dataFormatter: {
34
- sort: (a, b) => b.value - a.value
35
- },
36
- allPluginParams: {
37
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
38
- Pie: {
39
- innerRadius: 0.5,
40
- startAngle: - Math.PI / 2,
41
- endAngle: Math.PI / 2,
42
- },
43
- PieLabels: {
44
- startAngle: - Math.PI / 2,
45
- endAngle: Math.PI / 2,
46
- },
47
- PieEventTexts: {},
48
- SeriesLegend: {
49
- placement: 'bottom',
50
- listRectRadius: 7 // 圓型圖例列點
51
- }
52
- }
53
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_PIE_HALF_DONUT: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_PIE_HALF_DONUT',
7
+ description: 'Half donut chart',
8
+ descriptionZh: '半圓甜甜圈圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#7DD3C4",
14
+ "#FFA0A0",
15
+ "#6CBAFF",
16
+ "#55D339",
17
+ "#F9B052",
18
+ "#FF6C6C",
19
+ "#8E6BC9",
20
+ "#0088FF",
21
+ "#904026",
22
+ "#C4C4C4"
23
+ ],
24
+ }
25
+ },
26
+ padding: {
27
+ top: 120,
28
+ right: 60,
29
+ bottom: 0,
30
+ left: 60
31
+ },
32
+ },
33
+ dataFormatter: {
34
+ sort: (a, b) => b.value - a.value
35
+ },
36
+ pluginParams: {
37
+ Pie: {
38
+ innerRadius: 0.5,
39
+ startAngle: - Math.PI / 2,
40
+ endAngle: Math.PI / 2,
41
+ },
42
+ PieLabels: {
43
+ startAngle: - Math.PI / 2,
44
+ endAngle: Math.PI / 2,
45
+ },
46
+ PieEventTexts: {},
47
+ SeriesLegend: {
48
+ placement: 'bottom',
49
+ listRectRadius: 7 // 圓型圖例列點
50
+ }
51
+ }
52
+ }
54
53
  PRESET_PIE_HALF_DONUT.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,36 +1,34 @@
1
- import type { PresetPartial } from '../../lib/core-types'
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_PIE_SEPARATE_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_PIE_SEPARATE_SERIES',
8
- description: '分開顯示Series的圓餅圖',
9
- chartParams: {
10
- colors: {
11
- light: {
12
- label: [
13
- "#7DD3C4",
14
- "#FFA0A0",
15
- "#6CBAFF",
16
- "#55D339",
17
- "#F9B052",
18
- "#FF6C6C",
19
- "#8E6BC9",
20
- "#0088FF",
21
- "#904026",
22
- "#C4C4C4"
23
- ],
24
- }
25
- },
26
- },
27
- dataFormatter: {
28
- sort: (a, b) => b.value - a.value,
29
- separateSeries: true,
30
- },
31
- allPluginParams: {
32
- // ...ALL_PLUGIN_PARAMS_SERIES,
33
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
34
- }
35
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_PIE_SEPARATE_SERIES: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_PIE_SEPARATE_SERIES',
7
+ description: 'Separate pie chart of Series',
8
+ descriptionZh: '分開顯示Series的圓餅圖',
9
+ chartParams: {
10
+ colors: {
11
+ light: {
12
+ label: [
13
+ "#7DD3C4",
14
+ "#FFA0A0",
15
+ "#6CBAFF",
16
+ "#55D339",
17
+ "#F9B052",
18
+ "#FF6C6C",
19
+ "#8E6BC9",
20
+ "#0088FF",
21
+ "#904026",
22
+ "#C4C4C4"
23
+ ],
24
+ }
25
+ },
26
+ },
27
+ dataFormatter: {
28
+ sort: (a, b) => b.value - a.value,
29
+ separateSeries: true,
30
+ },
31
+ pluginParams: {
32
+ }
33
+ }
36
34
  PRESET_PIE_SEPARATE_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -0,0 +1,43 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetSeriesPluginParams, PresetSeriesTooltipParams, PresetNoneDataPluginParams } from '../types'
3
+
4
+ export const PRESET_PIE_SIMPLE: PresetPartial<'series', Partial<PresetSeriesPluginParams>
5
+ & Partial<PresetNoneDataPluginParams>> = {
6
+ name: 'PRESET_PIE_SIMPLE',
7
+ description: 'Simple pie chart',
8
+ descriptionZh: '簡單圓餅圖',
9
+ chartParams: {
10
+ padding: {
11
+ top: 30,
12
+ right: 30,
13
+ bottom: 30,
14
+ left: 30
15
+ },
16
+ colors: {
17
+ light: {
18
+ label: [
19
+ "#7DD3C4",
20
+ "#FFA0A0",
21
+ "#6CBAFF",
22
+ "#55D339",
23
+ "#F9B052",
24
+ "#FF6C6C",
25
+ "#8E6BC9",
26
+ "#0088FF",
27
+ "#904026",
28
+ "#C4C4C4"
29
+ ],
30
+ }
31
+ }
32
+ },
33
+ dataFormatter: {
34
+ sort: (a, b) => b.value - a.value
35
+ },
36
+ pluginParams: {
37
+ SeriesLegend: {
38
+ listRectRadius: 7, // 圓型圖例列點
39
+ padding: 7
40
+ }
41
+ }
42
+ }
43
+ PRESET_PIE_SIMPLE.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`