win-chart 2.8.2 → 2.9.0
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/dist/bundle.esm.js +13 -13
- package/dist/index.d.ts +139 -12
- package/dist/types/components/WinChart.d.ts +2 -4
- package/dist/types/index.d.ts +3 -1
- package/dist/types/types/index.d.ts +2 -1
- package/package.json +20 -16
- package/dist/bundle.esm.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as echarts$1 from 'echarts';
|
|
3
2
|
export { echarts$1 as echarts };
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React$1 from 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* 标准图表数据
|
|
8
8
|
*/
|
|
9
|
-
interface IChartInfo {
|
|
9
|
+
interface IChartInfo$1 {
|
|
10
10
|
label?: string;
|
|
11
11
|
value: number;
|
|
12
12
|
type?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
interface IWinChartProps {
|
|
15
|
+
interface IWinChartProps$1 {
|
|
16
16
|
theme?: 'light' | 'dark';
|
|
17
17
|
sort?: 'asc' | 'desc';
|
|
18
|
+
showLabel?: boolean;
|
|
18
19
|
color?: string[];
|
|
19
|
-
chartType?: WinChartType;
|
|
20
|
+
chartType?: WinChartType$1;
|
|
20
21
|
xAxisLabelRotate?: number;
|
|
21
22
|
xAxisLabelLength?: number;
|
|
22
|
-
data?: IChartInfo[];
|
|
23
|
-
extraData?: IChartInfo[];
|
|
23
|
+
data?: IChartInfo$1[];
|
|
24
|
+
extraData?: IChartInfo$1[];
|
|
24
25
|
className?: string;
|
|
25
26
|
style?: React.CSSProperties;
|
|
26
27
|
|
|
@@ -35,7 +36,7 @@ interface IWinChartProps {
|
|
|
35
36
|
yStart?: number[];
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
+
* series 配置 (对原有 series 配置补充,name 为匹配字段,必填,取值为 IChartInfo 中的 type 字段)
|
|
39
40
|
*/
|
|
40
41
|
extraSeriesOption?: echarts.SeriesOption[];
|
|
41
42
|
|
|
@@ -51,12 +52,12 @@ interface IWinChartProps {
|
|
|
51
52
|
/**
|
|
52
53
|
* 标题(默认为统计)
|
|
53
54
|
*/
|
|
54
|
-
title?: ICenterConfig;
|
|
55
|
+
title?: ICenterConfig$1;
|
|
55
56
|
|
|
56
57
|
/**
|
|
57
58
|
* 内容(默认为合计值)
|
|
58
59
|
*/
|
|
59
|
-
content?: ICenterConfig;
|
|
60
|
+
content?: ICenterConfig$1;
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
/**
|
|
@@ -65,7 +66,7 @@ interface IWinChartProps {
|
|
|
65
66
|
showStackTotal?: boolean;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
interface ICenterConfig {
|
|
69
|
+
interface ICenterConfig$1 {
|
|
69
70
|
/**
|
|
70
71
|
* 自定义统计显示内容
|
|
71
72
|
*/
|
|
@@ -85,7 +86,7 @@ interface ICenterConfig {
|
|
|
85
86
|
/**
|
|
86
87
|
* 图表类型
|
|
87
88
|
*/
|
|
88
|
-
declare enum WinChartType {
|
|
89
|
+
declare enum WinChartType$1 {
|
|
89
90
|
/**
|
|
90
91
|
* MINI面积图
|
|
91
92
|
*/
|
|
@@ -152,7 +153,133 @@ declare enum WinChartType {
|
|
|
152
153
|
RADAR,
|
|
153
154
|
}
|
|
154
155
|
|
|
155
|
-
declare const WinChart: (props: IWinChartProps) => react_jsx_runtime.JSX.Element;
|
|
156
|
+
declare const WinChart: (props: IWinChartProps$1) => react_jsx_runtime.JSX.Element;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* 标准图表数据
|
|
160
|
+
*/
|
|
161
|
+
interface IChartInfo {
|
|
162
|
+
label?: string;
|
|
163
|
+
value: number;
|
|
164
|
+
type?: string;
|
|
165
|
+
}
|
|
166
|
+
interface IWinChartProps {
|
|
167
|
+
theme?: 'light' | 'dark';
|
|
168
|
+
sort?: 'asc' | 'desc';
|
|
169
|
+
showLabel?: boolean;
|
|
170
|
+
color?: string[];
|
|
171
|
+
chartType?: WinChartType;
|
|
172
|
+
xAxisLabelRotate?: number;
|
|
173
|
+
xAxisLabelLength?: number;
|
|
174
|
+
data?: IChartInfo[];
|
|
175
|
+
extraData?: IChartInfo[];
|
|
176
|
+
className?: string;
|
|
177
|
+
style?: React.CSSProperties;
|
|
178
|
+
/**
|
|
179
|
+
* label 与 type 取值互换 (只作用饼图、环图、雷达图图表)
|
|
180
|
+
*/
|
|
181
|
+
reserveValueWithLabelType?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Y 轴起始值
|
|
184
|
+
*/
|
|
185
|
+
yStart?: number[];
|
|
186
|
+
/**
|
|
187
|
+
* series 配置 (对原有 series 配置补充,name 为匹配字段,必填,取值为 IChartInfo 中的 type 字段)
|
|
188
|
+
*/
|
|
189
|
+
extraSeriesOption?: echarts.SeriesOption[];
|
|
190
|
+
/**
|
|
191
|
+
* 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
|
|
192
|
+
*/
|
|
193
|
+
extraOption?: echarts.EChartsOption;
|
|
194
|
+
/**
|
|
195
|
+
* 环图中心部份配置
|
|
196
|
+
*/
|
|
197
|
+
cycleCenterConfig?: {
|
|
198
|
+
/**
|
|
199
|
+
* 标题(默认为统计)
|
|
200
|
+
*/
|
|
201
|
+
title?: ICenterConfig;
|
|
202
|
+
/**
|
|
203
|
+
* 内容(默认为合计值)
|
|
204
|
+
*/
|
|
205
|
+
content?: ICenterConfig;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* 堆叠总计
|
|
209
|
+
*/
|
|
210
|
+
showStackTotal?: boolean;
|
|
211
|
+
}
|
|
212
|
+
interface ICenterConfig {
|
|
213
|
+
/**
|
|
214
|
+
* 自定义统计显示内容
|
|
215
|
+
*/
|
|
216
|
+
value?: string;
|
|
217
|
+
/**
|
|
218
|
+
* 距离头部高度
|
|
219
|
+
*/
|
|
220
|
+
top?: number | string;
|
|
221
|
+
/**
|
|
222
|
+
* 字体大小
|
|
223
|
+
*/
|
|
224
|
+
fontSize?: string | number;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* 图表类型
|
|
228
|
+
*/
|
|
229
|
+
declare enum WinChartType {
|
|
230
|
+
/**
|
|
231
|
+
* MINI面积图
|
|
232
|
+
*/
|
|
233
|
+
MINI_AREA = 0,
|
|
234
|
+
/**
|
|
235
|
+
* 面积图
|
|
236
|
+
*/
|
|
237
|
+
AREA = 1,
|
|
238
|
+
/**
|
|
239
|
+
* 双轴图
|
|
240
|
+
*/
|
|
241
|
+
DUAL_LINE_BAR = 2,
|
|
242
|
+
/**
|
|
243
|
+
* 堆叠双轴图
|
|
244
|
+
*/
|
|
245
|
+
STACK_DUAL_LINE_BAR = 3,
|
|
246
|
+
/**
|
|
247
|
+
* 柱状图
|
|
248
|
+
*/
|
|
249
|
+
COLUMN = 4,
|
|
250
|
+
/**
|
|
251
|
+
* 堆叠柱状图
|
|
252
|
+
*/
|
|
253
|
+
STACK_COLUMN = 5,
|
|
254
|
+
/**
|
|
255
|
+
* 折线图
|
|
256
|
+
*/
|
|
257
|
+
LINE = 6,
|
|
258
|
+
/**
|
|
259
|
+
* 条形图
|
|
260
|
+
*/
|
|
261
|
+
BAR = 7,
|
|
262
|
+
/**
|
|
263
|
+
* 堆叠条形图
|
|
264
|
+
*/
|
|
265
|
+
STACK_BAR = 8,
|
|
266
|
+
/**
|
|
267
|
+
* 漏斗图
|
|
268
|
+
*/
|
|
269
|
+
FUNNEL = 9,
|
|
270
|
+
/**
|
|
271
|
+
* 饼图
|
|
272
|
+
*/
|
|
273
|
+
PIE = 10,
|
|
274
|
+
/**
|
|
275
|
+
* 环形图
|
|
276
|
+
*/
|
|
277
|
+
CYCLE = 11,
|
|
278
|
+
/**
|
|
279
|
+
* 雷达图
|
|
280
|
+
*/
|
|
281
|
+
RADAR = 12
|
|
282
|
+
}
|
|
156
283
|
|
|
157
284
|
interface IProps {
|
|
158
285
|
className: string;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const WinChart: (props: IWinChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export { echarts, WinChart, IWinChartProps, WinChartType, IChartInfo };
|
|
1
|
+
import { IWinChartProps } from '@/types';
|
|
2
|
+
export declare const WinChart: (props: IWinChartProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as echarts from 'echarts';
|
|
2
|
+
import { WinChart } from './components/WinChart';
|
|
3
|
+
import { WinChartType, IChartInfo, IWinChartProps } from './types';
|
|
2
4
|
import { EarthChart } from './components/EarthChart';
|
|
3
5
|
export { WinChart, IWinChartProps, WinChartType, IChartInfo, echarts, EarthChart, };
|
|
4
6
|
export default WinChart;
|
|
@@ -9,6 +9,7 @@ export interface IChartInfo {
|
|
|
9
9
|
export interface IWinChartProps {
|
|
10
10
|
theme?: 'light' | 'dark';
|
|
11
11
|
sort?: 'asc' | 'desc';
|
|
12
|
+
showLabel?: boolean;
|
|
12
13
|
color?: string[];
|
|
13
14
|
chartType?: WinChartType;
|
|
14
15
|
xAxisLabelRotate?: number;
|
|
@@ -26,7 +27,7 @@ export interface IWinChartProps {
|
|
|
26
27
|
*/
|
|
27
28
|
yStart?: number[];
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
+
* series 配置 (对原有 series 配置补充,name 为匹配字段,必填,取值为 IChartInfo 中的 type 字段)
|
|
30
31
|
*/
|
|
31
32
|
extraSeriesOption?: echarts.SeriesOption[];
|
|
32
33
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "win-chart",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "菜鸟地网统一图表组件",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"component"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"dayjs": "^1.11.
|
|
22
|
+
"dayjs": "^1.11.13",
|
|
23
23
|
"deepmerge": "^4.3.1",
|
|
24
24
|
"echarts": "^5.5.1",
|
|
25
25
|
"echarts-gl": "^2.0.9",
|
|
@@ -27,29 +27,33 @@
|
|
|
27
27
|
"react": "^18.3.1",
|
|
28
28
|
"react-dom": "^18.3.1",
|
|
29
29
|
"react-ganttastic": "^1.1.94",
|
|
30
|
-
"styled-components": "^6.1.
|
|
30
|
+
"styled-components": "^6.1.13"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@rollup/plugin-alias": "^5.1.
|
|
33
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
34
34
|
"@rollup/plugin-commonjs": "^25.0.8",
|
|
35
35
|
"@rollup/plugin-image": "^3.0.3",
|
|
36
36
|
"@rollup/plugin-json": "^6.1.0",
|
|
37
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
37
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
38
38
|
"@rollup/plugin-terser": "^0.4.4",
|
|
39
39
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
40
|
-
"@rsbuild/core": "^0.
|
|
41
|
-
"@rsbuild/plugin-react": "^0.6
|
|
42
|
-
"@types/node": "^20.
|
|
43
|
-
"@types/react": "^18.3.
|
|
44
|
-
"@types/react-dom": "^18.3.
|
|
45
|
-
"
|
|
46
|
-
"eslint-config-prettier": "^9.1.0",
|
|
47
|
-
"eslint-config-react-app": "^7.0.1",
|
|
48
|
-
"rollup": "^4.18.1",
|
|
40
|
+
"@rsbuild/core": "^1.0.19",
|
|
41
|
+
"@rsbuild/plugin-react": "^1.0.6",
|
|
42
|
+
"@types/node": "^20.17.6",
|
|
43
|
+
"@types/react": "^18.3.12",
|
|
44
|
+
"@types/react-dom": "^18.3.1",
|
|
45
|
+
"rollup": "^4.24.4",
|
|
49
46
|
"rollup-plugin-dts": "^6.1.1",
|
|
50
47
|
"rollup-plugin-postcss": "^4.0.2",
|
|
51
|
-
"tslib": "^2.
|
|
52
|
-
"
|
|
48
|
+
"tslib": "^2.8.1",
|
|
49
|
+
"@eslint/js": "^9.14.0",
|
|
50
|
+
"eslint": "^9.14.0",
|
|
51
|
+
"eslint-plugin-react": "^7.37.2",
|
|
52
|
+
"eslint-plugin-react-hooks": "5.0.0",
|
|
53
|
+
"globals": "^15.12.0",
|
|
54
|
+
"prettier": "^3.3.3",
|
|
55
|
+
"typescript": "^5.6.3",
|
|
56
|
+
"typescript-eslint": "^8.13.0"
|
|
53
57
|
},
|
|
54
58
|
"publishConfig": {
|
|
55
59
|
"access": "public"
|