@orbcharts/presets-basic 3.0.0-beta.4 → 3.0.0-beta.5

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 (65) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-presets-basic.es.js +43 -22
  3. package/dist/orbcharts-presets-basic.umd.js +1 -1
  4. package/dist/src/multiValue/PRESET_MULTI_VALUE_BASIC.d.ts +1 -1
  5. package/dist/src/multiValue/PRESET_MULTI_VALUE_SEPARATE_CATEGORY.d.ts +4 -0
  6. package/dist/src/multiValue/index.d.ts +1 -0
  7. package/lib/core-types.ts +7 -7
  8. package/lib/plugins-basic-types.ts +6 -6
  9. package/package.json +42 -42
  10. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +56 -56
  11. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +52 -52
  12. package/src/grid/PRESET_BARS_ROUND.ts +39 -39
  13. package/src/grid/PRESET_BARS_THIN.ts +36 -36
  14. package/src/grid/PRESET_GRID_BASIC.ts +27 -27
  15. package/src/grid/PRESET_GRID_HORIZONTAL.ts +44 -44
  16. package/src/grid/PRESET_GRID_PN_SCALE.ts +35 -35
  17. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +35 -35
  18. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +40 -40
  19. package/src/grid/PRESET_LINES_BASIC.ts +35 -35
  20. package/src/grid/PRESET_LINES_CURVE.ts +38 -38
  21. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +37 -37
  22. package/src/grid/PRESET_LINES_HORIZONTAL.ts +51 -51
  23. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +37 -37
  24. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +40 -40
  25. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +39 -39
  26. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +43 -43
  27. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +48 -48
  28. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +47 -47
  29. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +47 -47
  30. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +45 -45
  31. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +48 -48
  32. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +50 -50
  33. package/src/grid/index.ts +22 -22
  34. package/src/index.ts +5 -5
  35. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +38 -38
  36. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +86 -86
  37. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +58 -58
  38. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +60 -60
  39. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +86 -86
  40. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +104 -104
  41. package/src/multiGrid/index.ts +6 -6
  42. package/src/multiValue/PRESET_MULTI_VALUE_BASIC.ts +23 -23
  43. package/src/multiValue/PRESET_MULTI_VALUE_SEPARATE_CATEGORY.ts +26 -0
  44. package/src/multiValue/PRESET_SCATTER_BUBBLES_LINEAR_OPACITY.ts +26 -26
  45. package/src/multiValue/PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS.ts +26 -26
  46. package/src/multiValue/index.ts +3 -2
  47. package/src/params.ts +71 -71
  48. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +18 -18
  49. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +29 -29
  50. package/src/series/PRESET_PIE_BASIC.ts +18 -18
  51. package/src/series/PRESET_PIE_DONUT.ts +23 -23
  52. package/src/series/PRESET_PIE_HALF_DONUT.ts +36 -36
  53. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +24 -24
  54. package/src/series/PRESET_ROSE_BASIC.ts +19 -19
  55. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +24 -24
  56. package/src/series/PRESET_SERIES_BASIC.ts +16 -16
  57. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +17 -17
  58. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +18 -18
  59. package/src/series/PRESET_SERIES_SUM_SERIES.ts +18 -18
  60. package/src/series/index.ts +13 -13
  61. package/src/tree/PRESET_TREE_BASIC.ts +27 -27
  62. package/src/types.ts +321 -321
  63. package/tsconfig.base.json +13 -13
  64. package/tsconfig.json +2 -2
  65. package/vite.config.js +22 -22
@@ -0,0 +1,26 @@
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_GRID, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_MULTI_VALUE_SEPARATE_CATEGORY: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_MULTI_VALUE_SEPARATE_CATEGORY',
8
+ description: 'MultiValue 分開顯示category',
9
+ chartParams: {
10
+ padding: {
11
+ top: 60,
12
+ right: 60,
13
+ bottom: 120,
14
+ left: 60
15
+ },
16
+ },
17
+ dataFormatter: {
18
+ separateCategory: true
19
+ },
20
+ allPluginParams: {
21
+ MultiValueLegend: {
22
+ placement: 'bottom',
23
+ padding: 14,
24
+ }
25
+ }
26
+ }
@@ -1,26 +1,26 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_GRID, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_SCATTER_BUBBLES_LINEAR_OPACITY: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_SCATTER_BUBBLES_LINEAR_OPACITY',
8
- description: 'ScatterBubbles漸變透明度',
9
- chartParams: {
10
- padding: {
11
- top: 60,
12
- right: 60,
13
- bottom: 120,
14
- left: 60
15
- },
16
- },
17
- allPluginParams: {
18
- MultiValueLegend: {
19
- placement: 'bottom',
20
- padding: 14,
21
- },
22
- ScatterBubbles: {
23
- valueLinearOpacity: [0.6, 0.95]
24
- }
25
- }
26
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_GRID, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SCATTER_BUBBLES_LINEAR_OPACITY: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_SCATTER_BUBBLES_LINEAR_OPACITY',
8
+ description: 'ScatterBubbles漸變透明度',
9
+ chartParams: {
10
+ padding: {
11
+ top: 60,
12
+ right: 60,
13
+ bottom: 120,
14
+ left: 60
15
+ },
16
+ },
17
+ allPluginParams: {
18
+ MultiValueLegend: {
19
+ placement: 'bottom',
20
+ padding: 14,
21
+ },
22
+ ScatterBubbles: {
23
+ valueLinearOpacity: [0.6, 0.95]
24
+ }
25
+ }
26
+ }
@@ -1,26 +1,26 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
- // import { ALL_PLUGIN_PARAMS_GRID, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS',
8
- description: 'ScatterBubbles以半徑尺寸為比例',
9
- chartParams: {
10
- padding: {
11
- top: 60,
12
- right: 60,
13
- bottom: 120,
14
- left: 60
15
- },
16
- },
17
- allPluginParams: {
18
- MultiValueLegend: {
19
- placement: 'bottom',
20
- padding: 14,
21
- },
22
- ScatterBubbles: {
23
- arcScaleType: 'radius'
24
- }
25
- }
26
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetMultiValuePluginParams, PresetNoneDataPluginParams } from '../types'
3
+ // import { ALL_PLUGIN_PARAMS_GRID, ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS: PresetPartial<'multiValue', Partial<PresetMultiValuePluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS',
8
+ description: 'ScatterBubbles以半徑尺寸為比例',
9
+ chartParams: {
10
+ padding: {
11
+ top: 60,
12
+ right: 60,
13
+ bottom: 120,
14
+ left: 60
15
+ },
16
+ },
17
+ allPluginParams: {
18
+ MultiValueLegend: {
19
+ placement: 'bottom',
20
+ padding: 14,
21
+ },
22
+ ScatterBubbles: {
23
+ arcScaleType: 'radius'
24
+ }
25
+ }
26
+ }
@@ -1,3 +1,4 @@
1
- export { PRESET_MULTI_VALUE_BASIC } from './PRESET_MULTI_VALUE_BASIC'
2
- export { PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS } from './PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS'
1
+ export { PRESET_MULTI_VALUE_BASIC } from './PRESET_MULTI_VALUE_BASIC'
2
+ export { PRESET_MULTI_VALUE_SEPARATE_CATEGORY } from './PRESET_MULTI_VALUE_SEPARATE_CATEGORY'
3
+ export { PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS } from './PRESET_SCATTER_BUBBLES_SCALING_BY_RADIUS'
3
4
  export { PRESET_SCATTER_BUBBLES_LINEAR_OPACITY } from './PRESET_SCATTER_BUBBLES_LINEAR_OPACITY'
package/src/params.ts CHANGED
@@ -1,72 +1,72 @@
1
- import type {
2
- PresetSeriesPluginParams,
3
- PresetGridPluginParams,
4
- PresetMultiGridPluginParams,
5
- PresetMultiValuePluginParams,
6
- PresetTreePluginParams,
7
- PresetNoneDataPluginParams
8
- } from './types'
9
-
10
- export const ALL_PLUGIN_PARAMS_SERIES: PresetSeriesPluginParams = {
11
- Bubbles: {},
12
- Pie: {},
13
- PieEventTexts: {},
14
- PieLabels: {},
15
- Rose: {},
16
- RoseLabels: {},
17
- SeriesLegend: {},
18
- SeriesTooltip: {},
19
- }
20
-
21
- export const ALL_PLUGIN_PARAMS_GRID: PresetGridPluginParams = {
22
- Bars: {},
23
- BarsPN: {},
24
- BarStack: {},
25
- BarsTriangle: {},
26
- Dots: {},
27
- GridLegend: {},
28
- GridTooltip: {},
29
- GroupAux: {},
30
- GroupAxis: {},
31
- LineAreas: {},
32
- Lines: {},
33
- GridZoom: {},
34
- ValueAxis: {},
35
- ValueStackAxis: {},
36
- }
37
-
38
- export const ALL_PLUGIN_PARAMS_MULTI_GRID: PresetMultiGridPluginParams = {
39
- MultiBars: {},
40
- MultiBarStack: {},
41
- MultiBarsTriangle: {},
42
- MultiDots: {},
43
- MultiGridLegend: {},
44
- MultiGridTooltip: {},
45
- MultiGroupAxis: {},
46
- MultiLineAreas: {},
47
- MultiLines: {},
48
- MultiValueAxis: {},
49
- MultiValueStackAxis: {},
50
- OverlappingValueAxes: {},
51
- OverlappingValueStackAxes: {},
52
- }
53
-
54
- export const ALL_PLUGIN_PARAMS_MULTI_VALUE: PresetMultiValuePluginParams = {
55
- MultiValueLegend: {},
56
- MultiValueTooltip: {},
57
- Scatter: {},
58
- ScatterBubbles: {},
59
- XYAxes: {},
60
- XYAux: {},
61
- XYZoom: {}
62
- }
63
-
64
- export const ALL_PLUGIN_PARAMS_TREE: PresetTreePluginParams = {
65
- TreeLegend: {},
66
- TreeMap: {},
67
- TreeTooltip: {},
68
- }
69
-
70
- export const ALL_PLUGIN_PARAMS_NONE_DATA: PresetNoneDataPluginParams = {
71
- // Tooltip: {},
1
+ import type {
2
+ PresetSeriesPluginParams,
3
+ PresetGridPluginParams,
4
+ PresetMultiGridPluginParams,
5
+ PresetMultiValuePluginParams,
6
+ PresetTreePluginParams,
7
+ PresetNoneDataPluginParams
8
+ } from './types'
9
+
10
+ export const ALL_PLUGIN_PARAMS_SERIES: PresetSeriesPluginParams = {
11
+ Bubbles: {},
12
+ Pie: {},
13
+ PieEventTexts: {},
14
+ PieLabels: {},
15
+ Rose: {},
16
+ RoseLabels: {},
17
+ SeriesLegend: {},
18
+ SeriesTooltip: {},
19
+ }
20
+
21
+ export const ALL_PLUGIN_PARAMS_GRID: PresetGridPluginParams = {
22
+ Bars: {},
23
+ BarsPN: {},
24
+ BarStack: {},
25
+ BarsTriangle: {},
26
+ Dots: {},
27
+ GridLegend: {},
28
+ GridTooltip: {},
29
+ GroupAux: {},
30
+ GroupAxis: {},
31
+ LineAreas: {},
32
+ Lines: {},
33
+ GridZoom: {},
34
+ ValueAxis: {},
35
+ ValueStackAxis: {},
36
+ }
37
+
38
+ export const ALL_PLUGIN_PARAMS_MULTI_GRID: PresetMultiGridPluginParams = {
39
+ MultiBars: {},
40
+ MultiBarStack: {},
41
+ MultiBarsTriangle: {},
42
+ MultiDots: {},
43
+ MultiGridLegend: {},
44
+ MultiGridTooltip: {},
45
+ MultiGroupAxis: {},
46
+ MultiLineAreas: {},
47
+ MultiLines: {},
48
+ MultiValueAxis: {},
49
+ MultiValueStackAxis: {},
50
+ OverlappingValueAxes: {},
51
+ OverlappingValueStackAxes: {},
52
+ }
53
+
54
+ export const ALL_PLUGIN_PARAMS_MULTI_VALUE: PresetMultiValuePluginParams = {
55
+ MultiValueLegend: {},
56
+ MultiValueTooltip: {},
57
+ Scatter: {},
58
+ ScatterBubbles: {},
59
+ XYAxes: {},
60
+ XYAux: {},
61
+ XYZoom: {}
62
+ }
63
+
64
+ export const ALL_PLUGIN_PARAMS_TREE: PresetTreePluginParams = {
65
+ TreeLegend: {},
66
+ TreeMap: {},
67
+ TreeTooltip: {},
68
+ }
69
+
70
+ export const ALL_PLUGIN_PARAMS_NONE_DATA: PresetNoneDataPluginParams = {
71
+ // Tooltip: {},
72
72
  }
@@ -1,18 +1,18 @@
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
- allPluginParams: {
10
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
11
- Bubbles: {
12
- arcScaleType: 'radius'
13
- },
14
- SeriesLegend: {
15
- listRectRadius: 7 // 圓型圖例列點
16
- },
17
- },
18
- }
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
+ allPluginParams: {
10
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
11
+ Bubbles: {
12
+ arcScaleType: 'radius'
13
+ },
14
+ SeriesLegend: {
15
+ listRectRadius: 7 // 圓型圖例列點
16
+ },
17
+ },
18
+ }
@@ -1,29 +1,29 @@
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
- // 加長留空
11
- padding: {
12
- top: 160,
13
- right: 160,
14
- bottom: 160,
15
- left: 160
16
- },
17
- },
18
- dataFormatter: {
19
- separateSeries: true,
20
- },
21
- allPluginParams: {
22
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
23
- Bubbles: {},
24
- SeriesLegend: {
25
- listRectRadius: 7 // 圓型圖例列點
26
- },
27
- SeriesTooltip: {}
28
- }
29
- }
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
+ // 加長留空
11
+ padding: {
12
+ top: 160,
13
+ right: 160,
14
+ bottom: 160,
15
+ left: 160
16
+ },
17
+ },
18
+ dataFormatter: {
19
+ separateSeries: true,
20
+ },
21
+ allPluginParams: {
22
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
23
+ Bubbles: {},
24
+ SeriesLegend: {
25
+ listRectRadius: 7 // 圓型圖例列點
26
+ },
27
+ SeriesTooltip: {}
28
+ }
29
+ }
@@ -1,19 +1,19 @@
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: '基本Pie參數',
9
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value
11
- },
12
- allPluginParams: {
13
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
- SeriesLegend: {
15
- listRectRadius: 7 // 圓型圖例列點
16
- }
17
- }
18
- }
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: '基本Pie參數',
9
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value
11
+ },
12
+ allPluginParams: {
13
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
+ SeriesLegend: {
15
+ listRectRadius: 7 // 圓型圖例列點
16
+ }
17
+ }
18
+ }
19
19
  PRESET_PIE_BASIC.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,24 +1,24 @@
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
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value
11
- },
12
- allPluginParams: {
13
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
- Pie: {
15
- innerRadius: 0.5
16
- },
17
- PieLabels: {},
18
- PieEventTexts: {},
19
- SeriesLegend: {
20
- listRectRadius: 7 // 圓型圖例列點
21
- }
22
- }
23
- }
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
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value
11
+ },
12
+ allPluginParams: {
13
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
+ Pie: {
15
+ innerRadius: 0.5
16
+ },
17
+ PieLabels: {},
18
+ PieEventTexts: {},
19
+ SeriesLegend: {
20
+ listRectRadius: 7 // 圓型圖例列點
21
+ }
22
+ }
23
+ }
24
24
  PRESET_PIE_DONUT.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,37 +1,37 @@
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
- padding: {
11
- top: 120,
12
- right: 120,
13
- bottom: 0,
14
- left: 60
15
- },
16
- },
17
- dataFormatter: {
18
- sort: (a, b) => b.value - a.value
19
- },
20
- allPluginParams: {
21
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
22
- Pie: {
23
- innerRadius: 0.5,
24
- startAngle: - Math.PI / 2,
25
- endAngle: Math.PI / 2,
26
- },
27
- PieLabels: {
28
- startAngle: - Math.PI / 2,
29
- endAngle: Math.PI / 2,
30
- },
31
- PieEventTexts: {},
32
- SeriesLegend: {
33
- listRectRadius: 7 // 圓型圖例列點
34
- }
35
- }
36
- }
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
+ padding: {
11
+ top: 120,
12
+ right: 120,
13
+ bottom: 0,
14
+ left: 60
15
+ },
16
+ },
17
+ dataFormatter: {
18
+ sort: (a, b) => b.value - a.value
19
+ },
20
+ allPluginParams: {
21
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
22
+ Pie: {
23
+ innerRadius: 0.5,
24
+ startAngle: - Math.PI / 2,
25
+ endAngle: Math.PI / 2,
26
+ },
27
+ PieLabels: {
28
+ startAngle: - Math.PI / 2,
29
+ endAngle: Math.PI / 2,
30
+ },
31
+ PieEventTexts: {},
32
+ SeriesLegend: {
33
+ listRectRadius: 7 // 圓型圖例列點
34
+ }
35
+ }
36
+ }
37
37
  PRESET_PIE_HALF_DONUT.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,25 +1,25 @@
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_WITH_INNER_LABELS: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_PIE_WITH_INNER_LABELS',
8
- description: '圓餅圖及內部資料標籤',
9
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value
11
- },
12
- allPluginParams: {
13
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
- Pie: {},
15
- PieLabels: {
16
- "labelCentroid": 1.3, // 圖內資料標籤
17
- "labelColorType": "primary"
18
- },
19
- PieEventTexts: {},
20
- SeriesLegend: {
21
- listRectRadius: 7 // 圓型圖例列點
22
- }
23
- }
24
- }
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_WITH_INNER_LABELS: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_PIE_WITH_INNER_LABELS',
8
+ description: '圓餅圖及內部資料標籤',
9
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value
11
+ },
12
+ allPluginParams: {
13
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
+ Pie: {},
15
+ PieLabels: {
16
+ "labelCentroid": 1.3, // 圖內資料標籤
17
+ "labelColorType": "primary"
18
+ },
19
+ PieEventTexts: {},
20
+ SeriesLegend: {
21
+ listRectRadius: 7 // 圓型圖例列點
22
+ }
23
+ }
24
+ }
25
25
  PRESET_PIE_WITH_INNER_LABELS.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,20 +1,20 @@
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_ROSE_BASIC: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
- & Partial<PresetNoneDataPluginParams>> = {
7
- name: 'PRESET_ROSE_BASIC',
8
- description: '基本Rose參數',
9
- dataFormatter: {
10
- sort: (a, b) => b.value - a.value
11
- },
12
- allPluginParams: {
13
- // ...ALL_PLUGIN_PARAMS_SERIES,
14
- // ...ALL_PLUGIN_PARAMS_NONE_DATA,
15
- SeriesLegend: {
16
- listRectRadius: 7 // 圓型圖例列點
17
- }
18
- }
19
- }
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_ROSE_BASIC: PresetPartial<'series', Partial<PresetSeriesPluginParams>
6
+ & Partial<PresetNoneDataPluginParams>> = {
7
+ name: 'PRESET_ROSE_BASIC',
8
+ description: '基本Rose參數',
9
+ dataFormatter: {
10
+ sort: (a, b) => b.value - a.value
11
+ },
12
+ allPluginParams: {
13
+ // ...ALL_PLUGIN_PARAMS_SERIES,
14
+ // ...ALL_PLUGIN_PARAMS_NONE_DATA,
15
+ SeriesLegend: {
16
+ listRectRadius: 7 // 圓型圖例列點
17
+ }
18
+ }
19
+ }
20
20
  PRESET_ROSE_BASIC.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`