@orbcharts/presets-basic 3.0.0-alpha.1 → 3.0.0-alpha.2
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.
- package/LICENSE +200 -200
- package/dist/orbcharts-presets-basic.es.js +67 -57
- package/dist/orbcharts-presets-basic.umd.js +1 -1
- package/dist/src/index.d.ts +2 -0
- package/package.json +43 -43
- package/src/chartParamsFiles/CP_BOTTOM_LONG_PADDING.ts +13 -13
- package/src/chartParamsFiles/CP_BOTTOM_PADDING.ts +13 -13
- package/src/chartParamsFiles/CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT.ts +14 -14
- package/src/chartParamsFiles/CP_LEFT_PADDING.ts +13 -13
- package/src/chartParamsFiles/CP_RIGHT_PADDING.ts +13 -13
- package/src/chartParamsFiles/index.ts +4 -4
- package/src/createPreset.ts +87 -87
- package/src/gridDataFormatterFiles/DF_BOTTOM_VALUE_AXIS.ts +15 -15
- package/src/gridPluginParamsFiles/Bars/PP_BARS_ROUND.ts +14 -14
- package/src/gridPluginParamsFiles/Bars/PP_BARS_THIN.ts +14 -14
- package/src/gridPluginParamsFiles/Bars/index.ts +1 -1
- package/src/gridPluginParamsFiles/Dots/PP_DOTS_ONLY_SHOW_HIGHLIGHTED.ts +14 -14
- package/src/gridPluginParamsFiles/Dots/PP_DOTS_SOLID.ts +14 -14
- package/src/gridPluginParamsFiles/Dots/index.ts +1 -1
- package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM.ts +13 -13
- package/src/gridPluginParamsFiles/GridLegend/PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST.ts +14 -14
- package/src/gridPluginParamsFiles/GridLegend/index.ts +1 -1
- package/src/gridPluginParamsFiles/GroupAxis/PP_GROUP_AXIS_ROTATE_LABEL.ts +11 -11
- package/src/gridPluginParamsFiles/Lines/PP_LINES_CURVE.ts +12 -12
- package/src/gridPluginParamsFiles/index.ts +5 -5
- package/src/index.ts +114 -103
- package/src/seriesPluginParamsFiles/Bubbles/PP_BUBBLES_SCALING_BY_RADIUS.ts +11 -11
- package/src/seriesPluginParamsFiles/Pie/PP_PIE_DONUT.ts +12 -12
- package/src/seriesPluginParamsFiles/Pie/PP_PIE_HALF_DONUT.ts +14 -14
- package/src/seriesPluginParamsFiles/Pie/index.ts +1 -1
- package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_HALF_ANGLE.ts +13 -13
- package/src/seriesPluginParamsFiles/PieLabels/PP_PIE_LABELS_INNER.ts +13 -13
- package/src/seriesPluginParamsFiles/PieLabels/index.ts +1 -1
- package/src/seriesPluginParamsFiles/SeriesLegend/PP_SERIES_LEGEND_ROUND.ts +11 -11
- package/src/seriesPluginParamsFiles/index.ts +3 -3
- package/src/types.ts +58 -58
- package/tsconfig.json +13 -13
- package/vite.config.js +44 -44
package/src/index.ts
CHANGED
@@ -1,103 +1,114 @@
|
|
1
|
-
import {
|
2
|
-
createSeriesPreset,
|
3
|
-
createGridPreset,
|
4
|
-
createMultiGridPreset,
|
5
|
-
createMultiValuePreset,
|
6
|
-
createRelationshipPreset,
|
7
|
-
createTreePreset } from './createPreset'
|
8
|
-
|
9
|
-
// -- series --
|
10
|
-
// 通用 - PRESET_SERIES_[name]
|
11
|
-
export const PRESET_SERIES_BASIC = createSeriesPreset({
|
12
|
-
// chartParamsId: 'CP_RIGHT_PADDING',
|
13
|
-
allPluginParamsIds: [],
|
14
|
-
description: '基本Series參數'
|
15
|
-
})
|
16
|
-
// Bubbles - PRESET_BUBBLES_[name]
|
17
|
-
export const PRESET_BUBBLES_SCALING_BY_RADIUS = createSeriesPreset({
|
18
|
-
// chartParamsId: 'CP_RIGHT_PADDING',
|
19
|
-
allPluginParamsIds: ['PP_BUBBLES_SCALING_BY_RADIUS', 'PP_SERIES_LEGEND_ROUND'],
|
20
|
-
description: '以半徑尺寸為比例的泡泡圖'
|
21
|
-
})
|
22
|
-
// Pie - PRESET_PIE_[name]
|
23
|
-
export const PRESET_PIE_WITH_INNER_LABELS = createSeriesPreset({
|
24
|
-
// chartParamsId: 'CP_RIGHT_PADDING',
|
25
|
-
allPluginParamsIds: ['PP_PIE_LABELS_INNER', 'PP_SERIES_LEGEND_ROUND'],
|
26
|
-
description: '圓餅圖及內部資料標籤'
|
27
|
-
})
|
28
|
-
export const PRESET_PIE_DONUT = createSeriesPreset({
|
29
|
-
// chartParamsId: 'CP_RIGHT_PADDING',
|
30
|
-
allPluginParamsIds: ['PP_PIE_DONUT', 'PP_SERIES_LEGEND_ROUND'],
|
31
|
-
description: '甜甜圈圖'
|
32
|
-
})
|
33
|
-
export const PRESET_PIE_HALF_DONUT = createSeriesPreset({
|
34
|
-
// chartParamsId: 'CP_RIGHT_PADDING',
|
35
|
-
allPluginParamsIds: ['PP_PIE_HALF_DONUT', 'PP_PIE_LABELS_HALF_ANGLE', 'PP_SERIES_LEGEND_ROUND'],
|
36
|
-
description: '半圓甜甜圈圖'
|
37
|
-
})
|
38
|
-
|
39
|
-
// -- grid --
|
40
|
-
// 通用 - PRESET_GRID_[name]
|
41
|
-
export const PRESET_GRID_BASIC = createGridPreset({
|
42
|
-
chartParamsId: 'CP_BOTTOM_LONG_PADDING',
|
43
|
-
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
|
44
|
-
description: '基本Grid參數'
|
45
|
-
})
|
46
|
-
export const PRESET_GRID_ROTATE_AXIS_LABEL = createGridPreset({
|
47
|
-
chartParamsId: 'CP_BOTTOM_PADDING',
|
48
|
-
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM'],
|
49
|
-
description: '傾斜標籤'
|
50
|
-
})
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
allPluginParamsIds: ['
|
55
|
-
description: '
|
56
|
-
})
|
57
|
-
|
58
|
-
export const
|
59
|
-
chartParamsId: 'CP_BOTTOM_PADDING',
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
allPluginParamsIds: ['
|
67
|
-
description: '
|
68
|
-
})
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
//
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
})
|
86
|
-
//
|
87
|
-
//
|
88
|
-
//
|
89
|
-
//
|
90
|
-
//
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
//
|
99
|
-
|
100
|
-
//
|
101
|
-
|
102
|
-
|
103
|
-
|
1
|
+
import {
|
2
|
+
createSeriesPreset,
|
3
|
+
createGridPreset,
|
4
|
+
createMultiGridPreset,
|
5
|
+
createMultiValuePreset,
|
6
|
+
createRelationshipPreset,
|
7
|
+
createTreePreset } from './createPreset'
|
8
|
+
|
9
|
+
// -- series --
|
10
|
+
// 通用 - PRESET_SERIES_[name]
|
11
|
+
export const PRESET_SERIES_BASIC = createSeriesPreset({
|
12
|
+
// chartParamsId: 'CP_RIGHT_PADDING',
|
13
|
+
allPluginParamsIds: [],
|
14
|
+
description: '基本Series參數'
|
15
|
+
})
|
16
|
+
// Bubbles - PRESET_BUBBLES_[name]
|
17
|
+
export const PRESET_BUBBLES_SCALING_BY_RADIUS = createSeriesPreset({
|
18
|
+
// chartParamsId: 'CP_RIGHT_PADDING',
|
19
|
+
allPluginParamsIds: ['PP_BUBBLES_SCALING_BY_RADIUS', 'PP_SERIES_LEGEND_ROUND'],
|
20
|
+
description: '以半徑尺寸為比例的泡泡圖'
|
21
|
+
})
|
22
|
+
// Pie - PRESET_PIE_[name]
|
23
|
+
export const PRESET_PIE_WITH_INNER_LABELS = createSeriesPreset({
|
24
|
+
// chartParamsId: 'CP_RIGHT_PADDING',
|
25
|
+
allPluginParamsIds: ['PP_PIE_LABELS_INNER', 'PP_SERIES_LEGEND_ROUND'],
|
26
|
+
description: '圓餅圖及內部資料標籤'
|
27
|
+
})
|
28
|
+
export const PRESET_PIE_DONUT = createSeriesPreset({
|
29
|
+
// chartParamsId: 'CP_RIGHT_PADDING',
|
30
|
+
allPluginParamsIds: ['PP_PIE_DONUT', 'PP_SERIES_LEGEND_ROUND'],
|
31
|
+
description: '甜甜圈圖'
|
32
|
+
})
|
33
|
+
export const PRESET_PIE_HALF_DONUT = createSeriesPreset({
|
34
|
+
// chartParamsId: 'CP_RIGHT_PADDING',
|
35
|
+
allPluginParamsIds: ['PP_PIE_HALF_DONUT', 'PP_PIE_LABELS_HALF_ANGLE', 'PP_SERIES_LEGEND_ROUND'],
|
36
|
+
description: '半圓甜甜圈圖'
|
37
|
+
})
|
38
|
+
|
39
|
+
// -- grid --
|
40
|
+
// 通用 - PRESET_GRID_[name]
|
41
|
+
export const PRESET_GRID_BASIC = createGridPreset({
|
42
|
+
chartParamsId: 'CP_BOTTOM_LONG_PADDING',
|
43
|
+
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
|
44
|
+
description: '基本Grid參數'
|
45
|
+
})
|
46
|
+
export const PRESET_GRID_ROTATE_AXIS_LABEL = createGridPreset({
|
47
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
48
|
+
allPluginParamsIds: ['PP_GROUP_AXIS_ROTATE_LABEL', 'PP_GRID_LEGEND_BOTTOM'],
|
49
|
+
description: '傾斜標籤'
|
50
|
+
})
|
51
|
+
export const PRESET_GRID_HORIZONTAL = createGridPreset({
|
52
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
53
|
+
dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
54
|
+
allPluginParamsIds: ['PP_GRID_LEGEND_BOTTOM'],
|
55
|
+
description: '橫向圓角長條圖'
|
56
|
+
})
|
57
|
+
// Bars - PRESET_BARS_[name]
|
58
|
+
export const PRESET_BARS_ROUND = createGridPreset({
|
59
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
60
|
+
allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
|
61
|
+
description: '圓角長條圖'
|
62
|
+
})
|
63
|
+
export const PRESET_BARS_HORIZONTAL_AND_ROUND = createGridPreset({
|
64
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
65
|
+
dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
66
|
+
allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
|
67
|
+
description: '橫向圓角長條圖'
|
68
|
+
})
|
69
|
+
export const PRESET_BARS_THIN = createGridPreset({
|
70
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
71
|
+
allPluginParamsIds: ['PP_BARS_THIN', 'PP_GRID_LEGEND_BOTTOM'],
|
72
|
+
description: '細長條圖'
|
73
|
+
})
|
74
|
+
export const PRESET_BARS_HORIZONTAL_AND_THIN = createGridPreset({
|
75
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
76
|
+
dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
77
|
+
allPluginParamsIds: ['PP_BARS_ROUND', 'PP_GRID_LEGEND_BOTTOM'],
|
78
|
+
description: '橫向圓角長條圖'
|
79
|
+
})
|
80
|
+
// export const PRESET_BARS_HORIZONTAL_AND_THIN = createGridPreset({
|
81
|
+
// chartParamsId: 'CP_BOTTOM_PADDING',
|
82
|
+
// dataFormatterId: 'DF_BOTTOM_VALUE_AXIS',
|
83
|
+
// allPluginParamsIds: ['PP_BARS_THIN', 'PP_GRID_LEGEND_BOTTOM'],
|
84
|
+
// description: '橫向細長條圖'
|
85
|
+
// })
|
86
|
+
// Lines - PRESET_LINES_[name]
|
87
|
+
// export const PRESET_LINES_WITH_SOLID_DOTS = createGridPreset({
|
88
|
+
// chartParamsId: 'CP_BOTTOM_PADDING',
|
89
|
+
// allPluginParamsIds: ['PP_DOTS_SOLID', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
90
|
+
// description: '折線圖及實心圓點'
|
91
|
+
// })
|
92
|
+
export const PRESET_LINES_CURVE = createGridPreset({
|
93
|
+
chartParamsId: 'CP_BOTTOM_PADDING',
|
94
|
+
allPluginParamsIds: ['PP_LINES_CURVE', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
95
|
+
description: '弧線折線圖'
|
96
|
+
})
|
97
|
+
// export const PRESET_LINES_CURVES_WITH_SOLID_DOTS = createGridPreset({
|
98
|
+
// chartParamsId: 'CP_BOTTOM_PADDING',
|
99
|
+
// allPluginParamsIds: ['PP_LINES_CURVE', 'PP_DOTS_SOLID', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
100
|
+
// description: '弧線折線圖及實心圓點'
|
101
|
+
// })
|
102
|
+
export const PRESET_LINES_HIGHLIGHT_GROUP_DOTS = createGridPreset({
|
103
|
+
chartParamsId: 'CP_BOTTOM_PADDING_WITH_GROUP_HIGHLIGHT',
|
104
|
+
allPluginParamsIds: ['PP_DOTS_ONLY_SHOW_HIGHLIGHTED', 'PP_GRID_LEGEND_BOTTOM_WITH_LINE_LIST'],
|
105
|
+
description: '折線圖及Highlight Group圓點'
|
106
|
+
})
|
107
|
+
// -- multi-grid --
|
108
|
+
|
109
|
+
// -- multi-value --
|
110
|
+
|
111
|
+
// -- relationship --
|
112
|
+
|
113
|
+
// -- tree --
|
114
|
+
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import type { PluginParamsFile } from '../../types'
|
2
|
-
import type { BubblesParams } from '@orbcharts/plugins-basic'
|
3
|
-
|
4
|
-
export const PP_BUBBLES_SCALING_BY_RADIUS: PluginParamsFile<BubblesParams> = {
|
5
|
-
id: 'PP_BUBBLES_SCALING_BY_RADIUS',
|
6
|
-
chartType: 'series',
|
7
|
-
pluginName: 'Bubbles',
|
8
|
-
description: '以半徑尺寸為比例的泡泡圖',
|
9
|
-
data: {
|
10
|
-
bubbleScaleType: 'radius'
|
11
|
-
}
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { BubblesParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_BUBBLES_SCALING_BY_RADIUS: PluginParamsFile<BubblesParams> = {
|
5
|
+
id: 'PP_BUBBLES_SCALING_BY_RADIUS',
|
6
|
+
chartType: 'series',
|
7
|
+
pluginName: 'Bubbles',
|
8
|
+
description: '以半徑尺寸為比例的泡泡圖',
|
9
|
+
data: {
|
10
|
+
bubbleScaleType: 'radius'
|
11
|
+
}
|
12
12
|
}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import type { PluginParamsFile } from '../../types'
|
2
|
-
import type { PieParams } from '@orbcharts/plugins-basic'
|
3
|
-
|
4
|
-
export const PP_PIE_DONUT: PluginParamsFile<PieParams> = {
|
5
|
-
id: 'PP_PIE_DONUT',
|
6
|
-
chartType: 'series',
|
7
|
-
pluginName: 'Pie',
|
8
|
-
description: '甜甜圈圖',
|
9
|
-
data: {
|
10
|
-
innerRadius: 0.5
|
11
|
-
}
|
12
|
-
}
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { PieParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_PIE_DONUT: PluginParamsFile<PieParams> = {
|
5
|
+
id: 'PP_PIE_DONUT',
|
6
|
+
chartType: 'series',
|
7
|
+
pluginName: 'Pie',
|
8
|
+
description: '甜甜圈圖',
|
9
|
+
data: {
|
10
|
+
innerRadius: 0.5
|
11
|
+
}
|
12
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import type { PluginParamsFile } from '../../types'
|
2
|
-
import type { PieParams } from '@orbcharts/plugins-basic'
|
3
|
-
|
4
|
-
export const PP_PIE_HALF_DONUT: PluginParamsFile<PieParams> = {
|
5
|
-
id: 'PP_PIE_HALF_DONUT',
|
6
|
-
chartType: 'series',
|
7
|
-
pluginName: 'Pie',
|
8
|
-
description: '半圓甜甜圈圖',
|
9
|
-
data: {
|
10
|
-
innerRadius: 0.5,
|
11
|
-
startAngle: - Math.PI / 2,
|
12
|
-
endAngle: Math.PI / 2,
|
13
|
-
}
|
14
|
-
}
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { PieParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_PIE_HALF_DONUT: PluginParamsFile<PieParams> = {
|
5
|
+
id: 'PP_PIE_HALF_DONUT',
|
6
|
+
chartType: 'series',
|
7
|
+
pluginName: 'Pie',
|
8
|
+
description: '半圓甜甜圈圖',
|
9
|
+
data: {
|
10
|
+
innerRadius: 0.5,
|
11
|
+
startAngle: - Math.PI / 2,
|
12
|
+
endAngle: Math.PI / 2,
|
13
|
+
}
|
14
|
+
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export { PP_PIE_DONUT } from './PP_PIE_DONUT'
|
1
|
+
export { PP_PIE_DONUT } from './PP_PIE_DONUT'
|
2
2
|
export { PP_PIE_HALF_DONUT } from './PP_PIE_HALF_DONUT'
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import type { PluginParamsFile } from '../../types'
|
2
|
-
import type { PieLabelsParams } from '@orbcharts/plugins-basic'
|
3
|
-
|
4
|
-
export const PP_PIE_LABELS_HALF_ANGLE: PluginParamsFile<PieLabelsParams> = {
|
5
|
-
id: 'PP_PIE_LABELS_HALF_ANGLE',
|
6
|
-
chartType: 'series',
|
7
|
-
pluginName: 'PieLabels',
|
8
|
-
description: '半圓甜甜圈資料標籤',
|
9
|
-
data: {
|
10
|
-
startAngle: - Math.PI / 2,
|
11
|
-
endAngle: Math.PI / 2,
|
12
|
-
}
|
13
|
-
}
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { PieLabelsParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_PIE_LABELS_HALF_ANGLE: PluginParamsFile<PieLabelsParams> = {
|
5
|
+
id: 'PP_PIE_LABELS_HALF_ANGLE',
|
6
|
+
chartType: 'series',
|
7
|
+
pluginName: 'PieLabels',
|
8
|
+
description: '半圓甜甜圈資料標籤',
|
9
|
+
data: {
|
10
|
+
startAngle: - Math.PI / 2,
|
11
|
+
endAngle: Math.PI / 2,
|
12
|
+
}
|
13
|
+
}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import type { PluginParamsFile } from '../../types'
|
2
|
-
import type { PieLabelsParams } from '@orbcharts/plugins-basic'
|
3
|
-
|
4
|
-
export const PP_PIE_LABELS_INNER: PluginParamsFile<PieLabelsParams> = {
|
5
|
-
id: 'PP_PIE_LABELS_INNER',
|
6
|
-
chartType: 'series',
|
7
|
-
pluginName: 'PieLabels',
|
8
|
-
description: '圖內資料標籤',
|
9
|
-
data: {
|
10
|
-
"labelCentroid": 1.3,
|
11
|
-
"labelColorType": "primary"
|
12
|
-
}
|
13
|
-
}
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { PieLabelsParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_PIE_LABELS_INNER: PluginParamsFile<PieLabelsParams> = {
|
5
|
+
id: 'PP_PIE_LABELS_INNER',
|
6
|
+
chartType: 'series',
|
7
|
+
pluginName: 'PieLabels',
|
8
|
+
description: '圖內資料標籤',
|
9
|
+
data: {
|
10
|
+
"labelCentroid": 1.3,
|
11
|
+
"labelColorType": "primary"
|
12
|
+
}
|
13
|
+
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export { PP_PIE_LABELS_HALF_ANGLE } from './PP_PIE_LABELS_HALF_ANGLE'
|
1
|
+
export { PP_PIE_LABELS_HALF_ANGLE } from './PP_PIE_LABELS_HALF_ANGLE'
|
2
2
|
export { PP_PIE_LABELS_INNER } from './PP_PIE_LABELS_INNER'
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import type { PluginParamsFile } from '../../types'
|
2
|
-
import type { SeriesLegendParams } from '@orbcharts/plugins-basic'
|
3
|
-
|
4
|
-
export const PP_SERIES_LEGEND_ROUND: PluginParamsFile<SeriesLegendParams> = {
|
5
|
-
id: 'PP_SERIES_LEGEND_BOTTOM',
|
6
|
-
chartType: 'series',
|
7
|
-
pluginName: 'SeriesLegend',
|
8
|
-
description: '圓型圖例列點',
|
9
|
-
data: {
|
10
|
-
listRectRadius: 7
|
11
|
-
}
|
1
|
+
import type { PluginParamsFile } from '../../types'
|
2
|
+
import type { SeriesLegendParams } from '@orbcharts/plugins-basic'
|
3
|
+
|
4
|
+
export const PP_SERIES_LEGEND_ROUND: PluginParamsFile<SeriesLegendParams> = {
|
5
|
+
id: 'PP_SERIES_LEGEND_BOTTOM',
|
6
|
+
chartType: 'series',
|
7
|
+
pluginName: 'SeriesLegend',
|
8
|
+
description: '圓型圖例列點',
|
9
|
+
data: {
|
10
|
+
listRectRadius: 7
|
11
|
+
}
|
12
12
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export * from './Bubbles'
|
2
|
-
export * from './Pie'
|
3
|
-
export * from './PieLabels'
|
1
|
+
export * from './Bubbles'
|
2
|
+
export * from './Pie'
|
3
|
+
export * from './PieLabels'
|
4
4
|
export * from './SeriesLegend'
|
package/src/types.ts
CHANGED
@@ -1,58 +1,58 @@
|
|
1
|
-
import type {
|
2
|
-
ChartParamsPartial,
|
3
|
-
DataFormatterPartialTypeMap,
|
4
|
-
ChartType,
|
5
|
-
Preset } from '@orbcharts/core'
|
6
|
-
import * as chartParams from './chartParamsFiles'
|
7
|
-
import * as seriesDataFormatters from './seriesDataFormatterFiles'
|
8
|
-
import * as seriesPluginParams from './seriesPluginParamsFiles'
|
9
|
-
import * as gridDataFormatters from './gridDataFormatterFiles'
|
10
|
-
import * as gridPluginParams from './gridPluginParamsFiles'
|
11
|
-
import * as multiGridDataFormatters from './multiGridDataFormatterFiles'
|
12
|
-
import * as multiGridPluginParams from './multiGridPluginParamsFiles'
|
13
|
-
import * as multiValueDataFormatters from './multiValueDataFormatterFiles'
|
14
|
-
import * as multiValuePluginParams from './multiValuePluginParamsFiles'
|
15
|
-
import * as relationshipDataFormatters from './relationshipDataFormatterFiles'
|
16
|
-
import * as relationshipPluginParams from './relationshipPluginParamsFiles'
|
17
|
-
import * as treeDataFormatters from './treeDataFormatterFiles'
|
18
|
-
import * as treePluginParams from './treePluginParamsFiles'
|
19
|
-
|
20
|
-
export interface ChartParamsFile {
|
21
|
-
id: string
|
22
|
-
description: string
|
23
|
-
data: ChartParamsPartial
|
24
|
-
}
|
25
|
-
|
26
|
-
export interface DataFormatterFile<T extends ChartType> {
|
27
|
-
id: string
|
28
|
-
chartType: T
|
29
|
-
description: string
|
30
|
-
data: DataFormatterPartialTypeMap<T>
|
31
|
-
}
|
32
|
-
|
33
|
-
export interface PluginParamsFile<PluginParams> {
|
34
|
-
id: string
|
35
|
-
chartType: ChartType
|
36
|
-
pluginName: string
|
37
|
-
description: string
|
38
|
-
data: Partial<PluginParams>
|
39
|
-
}
|
40
|
-
|
41
|
-
export interface PresetFile<T extends ChartType> {
|
42
|
-
chartParamsId?: keyof typeof chartParams
|
43
|
-
dataFormatterId?: T extends 'series' ? keyof typeof seriesDataFormatters
|
44
|
-
: T extends 'grid' ? keyof typeof gridDataFormatters
|
45
|
-
: T extends 'multiGrid' ? keyof typeof multiGridDataFormatters
|
46
|
-
: T extends 'multiValue' ? keyof typeof multiValueDataFormatters
|
47
|
-
: T extends 'relationship' ? keyof typeof relationshipDataFormatters
|
48
|
-
: T extends 'tree' ? keyof typeof treeDataFormatters
|
49
|
-
: undefined
|
50
|
-
allPluginParamsIds?: T extends 'series' ? (keyof typeof seriesPluginParams)[]
|
51
|
-
: T extends 'grid' ? (keyof typeof gridPluginParams)[]
|
52
|
-
: T extends 'multiGrid' ? (keyof typeof multiGridPluginParams)[]
|
53
|
-
: T extends 'multiValue' ? (keyof typeof multiValuePluginParams)[]
|
54
|
-
: T extends 'relationship' ? (keyof typeof relationshipPluginParams)[]
|
55
|
-
: T extends 'tree' ? (keyof typeof treePluginParams)[]
|
56
|
-
: undefined,
|
57
|
-
description: string
|
58
|
-
}
|
1
|
+
import type {
|
2
|
+
ChartParamsPartial,
|
3
|
+
DataFormatterPartialTypeMap,
|
4
|
+
ChartType,
|
5
|
+
Preset } from '@orbcharts/core'
|
6
|
+
import * as chartParams from './chartParamsFiles'
|
7
|
+
import * as seriesDataFormatters from './seriesDataFormatterFiles'
|
8
|
+
import * as seriesPluginParams from './seriesPluginParamsFiles'
|
9
|
+
import * as gridDataFormatters from './gridDataFormatterFiles'
|
10
|
+
import * as gridPluginParams from './gridPluginParamsFiles'
|
11
|
+
import * as multiGridDataFormatters from './multiGridDataFormatterFiles'
|
12
|
+
import * as multiGridPluginParams from './multiGridPluginParamsFiles'
|
13
|
+
import * as multiValueDataFormatters from './multiValueDataFormatterFiles'
|
14
|
+
import * as multiValuePluginParams from './multiValuePluginParamsFiles'
|
15
|
+
import * as relationshipDataFormatters from './relationshipDataFormatterFiles'
|
16
|
+
import * as relationshipPluginParams from './relationshipPluginParamsFiles'
|
17
|
+
import * as treeDataFormatters from './treeDataFormatterFiles'
|
18
|
+
import * as treePluginParams from './treePluginParamsFiles'
|
19
|
+
|
20
|
+
export interface ChartParamsFile {
|
21
|
+
id: string
|
22
|
+
description: string
|
23
|
+
data: ChartParamsPartial
|
24
|
+
}
|
25
|
+
|
26
|
+
export interface DataFormatterFile<T extends ChartType> {
|
27
|
+
id: string
|
28
|
+
chartType: T
|
29
|
+
description: string
|
30
|
+
data: DataFormatterPartialTypeMap<T>
|
31
|
+
}
|
32
|
+
|
33
|
+
export interface PluginParamsFile<PluginParams> {
|
34
|
+
id: string
|
35
|
+
chartType: ChartType
|
36
|
+
pluginName: string
|
37
|
+
description: string
|
38
|
+
data: Partial<PluginParams>
|
39
|
+
}
|
40
|
+
|
41
|
+
export interface PresetFile<T extends ChartType> {
|
42
|
+
chartParamsId?: keyof typeof chartParams
|
43
|
+
dataFormatterId?: T extends 'series' ? keyof typeof seriesDataFormatters
|
44
|
+
: T extends 'grid' ? keyof typeof gridDataFormatters
|
45
|
+
: T extends 'multiGrid' ? keyof typeof multiGridDataFormatters
|
46
|
+
: T extends 'multiValue' ? keyof typeof multiValueDataFormatters
|
47
|
+
: T extends 'relationship' ? keyof typeof relationshipDataFormatters
|
48
|
+
: T extends 'tree' ? keyof typeof treeDataFormatters
|
49
|
+
: undefined
|
50
|
+
allPluginParamsIds?: T extends 'series' ? (keyof typeof seriesPluginParams)[]
|
51
|
+
: T extends 'grid' ? (keyof typeof gridPluginParams)[]
|
52
|
+
: T extends 'multiGrid' ? (keyof typeof multiGridPluginParams)[]
|
53
|
+
: T extends 'multiValue' ? (keyof typeof multiValuePluginParams)[]
|
54
|
+
: T extends 'relationship' ? (keyof typeof relationshipPluginParams)[]
|
55
|
+
: T extends 'tree' ? (keyof typeof treePluginParams)[]
|
56
|
+
: undefined,
|
57
|
+
description: string
|
58
|
+
}
|
package/tsconfig.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"outDir": "./dist/",
|
4
|
-
"sourceMap": true,
|
5
|
-
"noImplicitAny": true,
|
6
|
-
"module": "es6",
|
7
|
-
"target": "es5",
|
8
|
-
"jsx": "react",
|
9
|
-
"allowJs": true,
|
10
|
-
"moduleResolution": "node",
|
11
|
-
"allowSyntheticDefaultImports" : true,
|
12
|
-
"esModuleInterop" : true
|
13
|
-
}
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"outDir": "./dist/",
|
4
|
+
"sourceMap": true,
|
5
|
+
"noImplicitAny": true,
|
6
|
+
"module": "es6",
|
7
|
+
"target": "es5",
|
8
|
+
"jsx": "react",
|
9
|
+
"allowJs": true,
|
10
|
+
"moduleResolution": "node",
|
11
|
+
"allowSyntheticDefaultImports" : true,
|
12
|
+
"esModuleInterop" : true
|
13
|
+
}
|
14
14
|
}
|
package/vite.config.js
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
// import { fileURLToPath, URL } from 'node:url'
|
2
|
-
|
3
|
-
// import { resolve } from 'path'
|
4
|
-
import { defineConfig } from 'vite'
|
5
|
-
import dts from 'vite-plugin-dts'
|
6
|
-
|
7
|
-
const releaseConfig = {
|
8
|
-
plugins: [
|
9
|
-
dts({
|
10
|
-
insertTypesEntry: true
|
11
|
-
})
|
12
|
-
],
|
13
|
-
compilerOptions: {
|
14
|
-
composite: true
|
15
|
-
},
|
16
|
-
build: {
|
17
|
-
lib: {
|
18
|
-
entry: "src/index.ts",
|
19
|
-
name: 'orbcharts-presets-basic',
|
20
|
-
formats: ["es", "umd"],
|
21
|
-
fileName: format => `orbcharts-presets-basic.${format}.js`
|
22
|
-
},
|
23
|
-
// rollupOptions: {
|
24
|
-
// input: {
|
25
|
-
// main: resolve(__dirname, "src/index.ts")
|
26
|
-
// },
|
27
|
-
// external: ['vue'],
|
28
|
-
// output: {
|
29
|
-
// assetFileNames: 'my-library.css',
|
30
|
-
// exports: "named",
|
31
|
-
// globals: {
|
32
|
-
// vue: 'Vue',
|
33
|
-
// },
|
34
|
-
// },
|
35
|
-
// },
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
export default defineConfig(({ command, mode }) => {
|
40
|
-
if (mode === 'release') {
|
41
|
-
return releaseConfig
|
42
|
-
} else {
|
43
|
-
return releaseConfig
|
44
|
-
}
|
1
|
+
// import { fileURLToPath, URL } from 'node:url'
|
2
|
+
|
3
|
+
// import { resolve } from 'path'
|
4
|
+
import { defineConfig } from 'vite'
|
5
|
+
import dts from 'vite-plugin-dts'
|
6
|
+
|
7
|
+
const releaseConfig = {
|
8
|
+
plugins: [
|
9
|
+
dts({
|
10
|
+
insertTypesEntry: true
|
11
|
+
})
|
12
|
+
],
|
13
|
+
compilerOptions: {
|
14
|
+
composite: true
|
15
|
+
},
|
16
|
+
build: {
|
17
|
+
lib: {
|
18
|
+
entry: "src/index.ts",
|
19
|
+
name: 'orbcharts-presets-basic',
|
20
|
+
formats: ["es", "umd"],
|
21
|
+
fileName: format => `orbcharts-presets-basic.${format}.js`
|
22
|
+
},
|
23
|
+
// rollupOptions: {
|
24
|
+
// input: {
|
25
|
+
// main: resolve(__dirname, "src/index.ts")
|
26
|
+
// },
|
27
|
+
// external: ['vue'],
|
28
|
+
// output: {
|
29
|
+
// assetFileNames: 'my-library.css',
|
30
|
+
// exports: "named",
|
31
|
+
// globals: {
|
32
|
+
// vue: 'Vue',
|
33
|
+
// },
|
34
|
+
// },
|
35
|
+
// },
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
export default defineConfig(({ command, mode }) => {
|
40
|
+
if (mode === 'release') {
|
41
|
+
return releaseConfig
|
42
|
+
} else {
|
43
|
+
return releaseConfig
|
44
|
+
}
|
45
45
|
})
|