@orbcharts/presets-basic 3.0.0-alpha.46 → 3.0.0-alpha.48

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 (59) hide show
  1. package/LICENSE +200 -200
  2. package/dist/lib/plugins-basic-types.d.ts +1 -0
  3. package/dist/src/types.d.ts +1 -1
  4. package/lib/core-types.ts +7 -7
  5. package/lib/plugins-basic-types.ts +6 -0
  6. package/package.json +41 -43
  7. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +62 -62
  8. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +59 -59
  9. package/src/grid/PRESET_BARS_ROUND.ts +46 -46
  10. package/src/grid/PRESET_BARS_THIN.ts +43 -43
  11. package/src/grid/PRESET_GRID_BASIC.ts +25 -25
  12. package/src/grid/PRESET_GRID_HORIZONTAL.ts +42 -42
  13. package/src/grid/PRESET_GRID_PN_SCALE.ts +33 -33
  14. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +33 -33
  15. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +38 -38
  16. package/src/grid/PRESET_LINES_BASIC.ts +44 -44
  17. package/src/grid/PRESET_LINES_CURVE.ts +47 -47
  18. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +46 -46
  19. package/src/grid/PRESET_LINES_HORIZONTAL.ts +60 -60
  20. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +46 -46
  21. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +49 -49
  22. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +48 -48
  23. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +54 -54
  24. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +59 -59
  25. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +58 -58
  26. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +58 -58
  27. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +56 -56
  28. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +59 -59
  29. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +61 -61
  30. package/src/grid/index.ts +22 -22
  31. package/src/index.ts +4 -4
  32. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +36 -36
  33. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +85 -85
  34. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +57 -57
  35. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +59 -59
  36. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +103 -103
  37. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +121 -121
  38. package/src/multiGrid/index.ts +6 -6
  39. package/src/params.ts +56 -56
  40. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +19 -19
  41. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +29 -29
  42. package/src/series/PRESET_PIE_BASIC.ts +18 -18
  43. package/src/series/PRESET_PIE_DONUT.ts +26 -26
  44. package/src/series/PRESET_PIE_HALF_DONUT.ts +39 -39
  45. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +27 -27
  46. package/src/series/PRESET_ROSE_BASIC.ts +18 -18
  47. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +26 -26
  48. package/src/series/PRESET_SERIES_BASIC.ts +15 -15
  49. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +16 -16
  50. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +17 -17
  51. package/src/series/PRESET_SERIES_SUM_SERIES.ts +17 -17
  52. package/src/series/index.ts +13 -13
  53. package/src/tree/PRESET_TREE_BASIC.ts +25 -25
  54. package/src/types.ts +241 -241
  55. package/tsconfig.base.json +13 -13
  56. package/tsconfig.json +2 -2
  57. package/vite.config.js +22 -22
  58. package/dist/lib/plugins-basic.d.ts +0 -1
  59. package/lib/plugins-basic.ts +0 -6
package/src/params.ts CHANGED
@@ -1,57 +1,57 @@
1
- import type {
2
- PresetSeriesPluginParams,
3
- PresetGridPluginParams,
4
- PresetMultiGridPluginParams,
5
- PresetTreePluginParams,
6
- PresetNoneDataPluginParams
7
- } from './types'
8
-
9
- export const ALL_PLUGIN_PARAMS_SERIES: PresetSeriesPluginParams = {
10
- Bubbles: {},
11
- Pie: {},
12
- PieEventTexts: {},
13
- PieLabels: {},
14
- Rose: {},
15
- RoseLabels: {},
16
- SeriesLegend: {},
17
- }
18
-
19
- export const ALL_PLUGIN_PARAMS_GRID: PresetGridPluginParams = {
20
- Bars: {},
21
- BarsPN: {},
22
- BarStack: {},
23
- BarsTriangle: {},
24
- Dots: {},
25
- GridLegend: {},
26
- GroupAux: {},
27
- GroupAxis: {},
28
- LineAreas: {},
29
- Lines: {},
30
- ScalingArea: {},
31
- ValueAxis: {},
32
- ValueStackAxis: {},
33
- }
34
-
35
- export const ALL_PLUGIN_PARAMS_MULTI_GRID: PresetMultiGridPluginParams = {
36
- MultiBars: {},
37
- MultiBarStack: {},
38
- MultiBarsTriangle: {},
39
- MultiDots: {},
40
- MultiGridLegend: {},
41
- MultiGroupAxis: {},
42
- MultiLineAreas: {},
43
- MultiLines: {},
44
- MultiValueAxis: {},
45
- MultiValueStackAxis: {},
46
- OverlappingValueAxes: {},
47
- OverlappingValueStackAxes: {},
48
- }
49
-
50
- export const ALL_PLUGIN_PARAMS_TREE: PresetTreePluginParams = {
51
- TreeLegend: {},
52
- TreeMap: {},
53
- }
54
-
55
- export const ALL_PLUGIN_PARAMS_NONE_DATA: PresetNoneDataPluginParams = {
56
- Tooltip: {},
1
+ import type {
2
+ PresetSeriesPluginParams,
3
+ PresetGridPluginParams,
4
+ PresetMultiGridPluginParams,
5
+ PresetTreePluginParams,
6
+ PresetNoneDataPluginParams
7
+ } from './types'
8
+
9
+ export const ALL_PLUGIN_PARAMS_SERIES: PresetSeriesPluginParams = {
10
+ Bubbles: {},
11
+ Pie: {},
12
+ PieEventTexts: {},
13
+ PieLabels: {},
14
+ Rose: {},
15
+ RoseLabels: {},
16
+ SeriesLegend: {},
17
+ }
18
+
19
+ export const ALL_PLUGIN_PARAMS_GRID: PresetGridPluginParams = {
20
+ Bars: {},
21
+ BarsPN: {},
22
+ BarStack: {},
23
+ BarsTriangle: {},
24
+ Dots: {},
25
+ GridLegend: {},
26
+ GroupAux: {},
27
+ GroupAxis: {},
28
+ LineAreas: {},
29
+ Lines: {},
30
+ ScalingArea: {},
31
+ ValueAxis: {},
32
+ ValueStackAxis: {},
33
+ }
34
+
35
+ export const ALL_PLUGIN_PARAMS_MULTI_GRID: PresetMultiGridPluginParams = {
36
+ MultiBars: {},
37
+ MultiBarStack: {},
38
+ MultiBarsTriangle: {},
39
+ MultiDots: {},
40
+ MultiGridLegend: {},
41
+ MultiGroupAxis: {},
42
+ MultiLineAreas: {},
43
+ MultiLines: {},
44
+ MultiValueAxis: {},
45
+ MultiValueStackAxis: {},
46
+ OverlappingValueAxes: {},
47
+ OverlappingValueStackAxes: {},
48
+ }
49
+
50
+ export const ALL_PLUGIN_PARAMS_TREE: PresetTreePluginParams = {
51
+ TreeLegend: {},
52
+ TreeMap: {},
53
+ }
54
+
55
+ export const ALL_PLUGIN_PARAMS_NONE_DATA: PresetNoneDataPluginParams = {
56
+ Tooltip: {},
57
57
  }
@@ -1,19 +1,19 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetBubblesParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_BUBBLES_SCALING_BY_RADIUS: PresetPartial<'series', PresetBubblesParams
6
- & PresetSeriesLegendParams
7
- & PresetNoneDataPluginParams> = {
8
- name: 'PRESET_BUBBLES_SCALING_BY_RADIUS',
9
- description: '以半徑尺寸為比例的泡泡圖',
10
- allPluginParams: {
11
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
12
- Bubbles: {
13
- arcScaleType: 'radius'
14
- },
15
- SeriesLegend: {
16
- listRectRadius: 7 // 圓型圖例列點
17
- }
18
- },
19
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetBubblesParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_BUBBLES_SCALING_BY_RADIUS: PresetPartial<'series', PresetBubblesParams
6
+ & PresetSeriesLegendParams
7
+ & PresetNoneDataPluginParams> = {
8
+ name: 'PRESET_BUBBLES_SCALING_BY_RADIUS',
9
+ description: '以半徑尺寸為比例的泡泡圖',
10
+ allPluginParams: {
11
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
12
+ Bubbles: {
13
+ arcScaleType: 'radius'
14
+ },
15
+ SeriesLegend: {
16
+ listRectRadius: 7 // 圓型圖例列點
17
+ }
18
+ },
19
+ }
@@ -1,29 +1,29 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetBubblesParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_BUBBLES_SEPARATE_SERIES: PresetPartial<'series', PresetBubblesParams
6
- & PresetSeriesLegendParams
7
- & PresetNoneDataPluginParams> = {
8
- name: 'PRESET_BUBBLES_SEPARATE_SERIES',
9
- description: '分開顯示Series泡泡',
10
- chartParams: {
11
- // 加長留空
12
- padding: {
13
- top: 160,
14
- right: 160,
15
- bottom: 160,
16
- left: 160
17
- },
18
- },
19
- dataFormatter: {
20
- separateSeries: true,
21
- },
22
- allPluginParams: {
23
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
24
- Bubbles: {},
25
- SeriesLegend: {
26
- listRectRadius: 7 // 圓型圖例列點
27
- }
28
- }
29
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetBubblesParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_BUBBLES_SEPARATE_SERIES: PresetPartial<'series', PresetBubblesParams
6
+ & PresetSeriesLegendParams
7
+ & PresetNoneDataPluginParams> = {
8
+ name: 'PRESET_BUBBLES_SEPARATE_SERIES',
9
+ description: '分開顯示Series泡泡',
10
+ chartParams: {
11
+ // 加長留空
12
+ padding: {
13
+ top: 160,
14
+ right: 160,
15
+ bottom: 160,
16
+ left: 160
17
+ },
18
+ },
19
+ dataFormatter: {
20
+ separateSeries: true,
21
+ },
22
+ allPluginParams: {
23
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
24
+ Bubbles: {},
25
+ SeriesLegend: {
26
+ listRectRadius: 7 // 圓型圖例列點
27
+ }
28
+ }
29
+ }
@@ -1,19 +1,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_PIE_BASIC: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
- name: 'PRESET_PIE_BASIC',
7
- description: '基本Pie參數',
8
- dataFormatter: {
9
- sort: (a, b) => b.value - a.value
10
- },
11
- allPluginParams: {
12
- ...ALL_PLUGIN_PARAMS_SERIES,
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, 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', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_PIE_BASIC',
7
+ description: '基本Pie參數',
8
+ dataFormatter: {
9
+ sort: (a, b) => b.value - a.value
10
+ },
11
+ allPluginParams: {
12
+ ...ALL_PLUGIN_PARAMS_SERIES,
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,27 +1,27 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetPieParams, PresetPieLabelsParams, PresetPieEventTextsParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_PIE_DONUT: PresetPartial<'series', PresetPieParams
6
- & PresetPieLabelsParams
7
- & PresetPieEventTextsParams
8
- & PresetSeriesLegendParams
9
- & PresetNoneDataPluginParams> = {
10
- name: 'PRESET_PIE_DONUT',
11
- description: '甜甜圈圖',
12
- dataFormatter: {
13
- sort: (a, b) => b.value - a.value
14
- },
15
- allPluginParams: {
16
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
17
- Pie: {
18
- innerRadius: 0.5
19
- },
20
- PieLabels: {},
21
- PieEventTexts: {},
22
- SeriesLegend: {
23
- listRectRadius: 7 // 圓型圖例列點
24
- }
25
- }
26
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetPieParams, PresetPieLabelsParams, PresetPieEventTextsParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_PIE_DONUT: PresetPartial<'series', PresetPieParams
6
+ & PresetPieLabelsParams
7
+ & PresetPieEventTextsParams
8
+ & PresetSeriesLegendParams
9
+ & PresetNoneDataPluginParams> = {
10
+ name: 'PRESET_PIE_DONUT',
11
+ description: '甜甜圈圖',
12
+ dataFormatter: {
13
+ sort: (a, b) => b.value - a.value
14
+ },
15
+ allPluginParams: {
16
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
17
+ Pie: {
18
+ innerRadius: 0.5
19
+ },
20
+ PieLabels: {},
21
+ PieEventTexts: {},
22
+ SeriesLegend: {
23
+ listRectRadius: 7 // 圓型圖例列點
24
+ }
25
+ }
26
+ }
27
27
  PRESET_PIE_DONUT.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,40 +1,40 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetPieParams, PresetPieLabelsParams, PresetPieEventTextsParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_PIE_HALF_DONUT: PresetPartial<'series', PresetPieParams
6
- & PresetPieLabelsParams
7
- & PresetPieEventTextsParams
8
- & PresetSeriesLegendParams
9
- & PresetNoneDataPluginParams> = {
10
- name: 'PRESET_PIE_HALF_DONUT',
11
- description: '半圓甜甜圈圖',
12
- chartParams: {
13
- padding: {
14
- top: 120,
15
- right: 120,
16
- bottom: 0,
17
- left: 60
18
- },
19
- },
20
- dataFormatter: {
21
- sort: (a, b) => b.value - a.value
22
- },
23
- allPluginParams: {
24
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
25
- Pie: {
26
- innerRadius: 0.5,
27
- startAngle: - Math.PI / 2,
28
- endAngle: Math.PI / 2,
29
- },
30
- PieLabels: {
31
- startAngle: - Math.PI / 2,
32
- endAngle: Math.PI / 2,
33
- },
34
- PieEventTexts: {},
35
- SeriesLegend: {
36
- listRectRadius: 7 // 圓型圖例列點
37
- }
38
- }
39
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetPieParams, PresetPieLabelsParams, PresetPieEventTextsParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_PIE_HALF_DONUT: PresetPartial<'series', PresetPieParams
6
+ & PresetPieLabelsParams
7
+ & PresetPieEventTextsParams
8
+ & PresetSeriesLegendParams
9
+ & PresetNoneDataPluginParams> = {
10
+ name: 'PRESET_PIE_HALF_DONUT',
11
+ description: '半圓甜甜圈圖',
12
+ chartParams: {
13
+ padding: {
14
+ top: 120,
15
+ right: 120,
16
+ bottom: 0,
17
+ left: 60
18
+ },
19
+ },
20
+ dataFormatter: {
21
+ sort: (a, b) => b.value - a.value
22
+ },
23
+ allPluginParams: {
24
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
25
+ Pie: {
26
+ innerRadius: 0.5,
27
+ startAngle: - Math.PI / 2,
28
+ endAngle: Math.PI / 2,
29
+ },
30
+ PieLabels: {
31
+ startAngle: - Math.PI / 2,
32
+ endAngle: Math.PI / 2,
33
+ },
34
+ PieEventTexts: {},
35
+ SeriesLegend: {
36
+ listRectRadius: 7 // 圓型圖例列點
37
+ }
38
+ }
39
+ }
40
40
  PRESET_PIE_HALF_DONUT.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,28 +1,28 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetPieParams, PresetPieLabelsParams, PresetPieEventTextsParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_PIE_WITH_INNER_LABELS: PresetPartial<'series', PresetPieParams
6
- & PresetPieLabelsParams
7
- & PresetPieEventTextsParams
8
- & PresetSeriesLegendParams
9
- & PresetNoneDataPluginParams> = {
10
- name: 'PRESET_PIE_WITH_INNER_LABELS',
11
- description: '圓餅圖及內部資料標籤',
12
- dataFormatter: {
13
- sort: (a, b) => b.value - a.value
14
- },
15
- allPluginParams: {
16
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
17
- Pie: {},
18
- PieLabels: {
19
- "labelCentroid": 1.3, // 圖內資料標籤
20
- "labelColorType": "primary"
21
- },
22
- PieEventTexts: {},
23
- SeriesLegend: {
24
- listRectRadius: 7 // 圓型圖例列點
25
- }
26
- }
27
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetPieParams, PresetPieLabelsParams, PresetPieEventTextsParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_PIE_WITH_INNER_LABELS: PresetPartial<'series', PresetPieParams
6
+ & PresetPieLabelsParams
7
+ & PresetPieEventTextsParams
8
+ & PresetSeriesLegendParams
9
+ & PresetNoneDataPluginParams> = {
10
+ name: 'PRESET_PIE_WITH_INNER_LABELS',
11
+ description: '圓餅圖及內部資料標籤',
12
+ dataFormatter: {
13
+ sort: (a, b) => b.value - a.value
14
+ },
15
+ allPluginParams: {
16
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
17
+ Pie: {},
18
+ PieLabels: {
19
+ "labelCentroid": 1.3, // 圖內資料標籤
20
+ "labelColorType": "primary"
21
+ },
22
+ PieEventTexts: {},
23
+ SeriesLegend: {
24
+ listRectRadius: 7 // 圓型圖例列點
25
+ }
26
+ }
27
+ }
28
28
  PRESET_PIE_WITH_INNER_LABELS.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,19 +1,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', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
- name: 'PRESET_ROSE_BASIC',
7
- description: '基本Rose參數',
8
- dataFormatter: {
9
- sort: (a, b) => b.value - a.value
10
- },
11
- allPluginParams: {
12
- ...ALL_PLUGIN_PARAMS_SERIES,
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, 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', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_ROSE_BASIC',
7
+ description: '基本Rose參數',
8
+ dataFormatter: {
9
+ sort: (a, b) => b.value - a.value
10
+ },
11
+ allPluginParams: {
12
+ ...ALL_PLUGIN_PARAMS_SERIES,
13
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
14
+ SeriesLegend: {
15
+ listRectRadius: 7 // 圓型圖例列點
16
+ }
17
+ }
18
+ }
19
19
  PRESET_ROSE_BASIC.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,27 +1,27 @@
1
- import type { PresetPartial } from '../../lib/core-types'
2
- import type { PresetRoseParams, PresetRoseLabelsParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_ROSE_SCALING_BY_RADIUS: PresetPartial<'series', PresetRoseParams
6
- & PresetRoseLabelsParams
7
- & PresetSeriesLegendParams
8
- & PresetNoneDataPluginParams> = {
9
- name: 'PRESET_ROSE_SCALING_BY_RADIUS',
10
- description: '以半徑尺寸為比例的玫瑰圖',
11
- dataFormatter: {
12
- sort: (a, b) => b.value - a.value
13
- },
14
- allPluginParams: {
15
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
16
- Rose: {
17
- arcScaleType: 'radius'
18
- },
19
- RoseLabels: {
20
- arcScaleType: 'radius',
21
- },
22
- SeriesLegend: {
23
- listRectRadius: 7 // 圓型圖例列點
24
- }
25
- }
26
- }
1
+ import type { PresetPartial } from '../../lib/core-types'
2
+ import type { PresetRoseParams, PresetRoseLabelsParams, PresetSeriesLegendParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_ROSE_SCALING_BY_RADIUS: PresetPartial<'series', PresetRoseParams
6
+ & PresetRoseLabelsParams
7
+ & PresetSeriesLegendParams
8
+ & PresetNoneDataPluginParams> = {
9
+ name: 'PRESET_ROSE_SCALING_BY_RADIUS',
10
+ description: '以半徑尺寸為比例的玫瑰圖',
11
+ dataFormatter: {
12
+ sort: (a, b) => b.value - a.value
13
+ },
14
+ allPluginParams: {
15
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
16
+ Rose: {
17
+ arcScaleType: 'radius'
18
+ },
19
+ RoseLabels: {
20
+ arcScaleType: 'radius',
21
+ },
22
+ SeriesLegend: {
23
+ listRectRadius: 7 // 圓型圖例列點
24
+ }
25
+ }
26
+ }
27
27
  PRESET_ROSE_SCALING_BY_RADIUS.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,15 +1,15 @@
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_SERIES_BASIC: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
- name: 'PRESET_SERIES_BASIC',
7
- description: '基本Series參數',
8
- allPluginParams: {
9
- ...ALL_PLUGIN_PARAMS_SERIES,
10
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
11
- SeriesLegend: {
12
- listRectRadius: 7 // 圓型圖例列點
13
- }
14
- }
15
- }
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_SERIES_BASIC: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_SERIES_BASIC',
7
+ description: '基本Series參數',
8
+ allPluginParams: {
9
+ ...ALL_PLUGIN_PARAMS_SERIES,
10
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
11
+ SeriesLegend: {
12
+ listRectRadius: 7 // 圓型圖例列點
13
+ }
14
+ }
15
+ }
@@ -1,17 +1,17 @@
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_SERIES_SEPARATE_SERIES: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
- name: 'PRESET_SERIES_SEPARATE_SERIES',
7
- description: '分開顯示Series',
8
- dataFormatter: {
9
- sort: (a, b) => b.value - a.value,
10
- separateSeries: true,
11
- },
12
- allPluginParams: {
13
- ...ALL_PLUGIN_PARAMS_SERIES,
14
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
15
- }
16
- }
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_SERIES_SEPARATE_SERIES: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_SERIES_SEPARATE_SERIES',
7
+ description: '分開顯示Series',
8
+ dataFormatter: {
9
+ sort: (a, b) => b.value - a.value,
10
+ separateSeries: true,
11
+ },
12
+ allPluginParams: {
13
+ ...ALL_PLUGIN_PARAMS_SERIES,
14
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
15
+ }
16
+ }
17
17
  PRESET_SERIES_SEPARATE_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`
@@ -1,18 +1,18 @@
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_SERIES_SEPARATE_SERIES_AND_SUM_SERIES: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
- name: 'PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES',
7
- description: '分開顯示Series並合併Series資料',
8
- dataFormatter: {
9
- sort: (a, b) => b.value - a.value,
10
- separateSeries: true,
11
- sumSeries: true,
12
- },
13
- allPluginParams: {
14
- ...ALL_PLUGIN_PARAMS_SERIES,
15
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
16
- }
17
- }
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_SERIES_SEPARATE_SERIES_AND_SUM_SERIES: PresetPartial<'series', PresetSeriesPluginParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES',
7
+ description: '分開顯示Series並合併Series資料',
8
+ dataFormatter: {
9
+ sort: (a, b) => b.value - a.value,
10
+ separateSeries: true,
11
+ sumSeries: true,
12
+ },
13
+ allPluginParams: {
14
+ ...ALL_PLUGIN_PARAMS_SERIES,
15
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
16
+ }
17
+ }
18
18
  PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.dataFormatter.sort.toString = () => `(a, b) => b.value - a.value`