win-chart 2.0.1 → 2.0.3

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/index.d.ts CHANGED
@@ -1,6 +1,113 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React$1, { CSSProperties } from 'react';
3
3
 
4
+ /**
5
+ * 标准图表数据
6
+ */
7
+ interface ICharInfo {
8
+ label: string;
9
+ value: number;
10
+ type?: string;
11
+ }
12
+
13
+ interface IWinChartProps {
14
+ theme?: 'light' | 'dark';
15
+ sort?: 'asc' | 'desc';
16
+ color?: string[];
17
+ chartType?: WinChartType;
18
+ xAxisLabelRotate?: number;
19
+ xAxisLabelLength?: number;
20
+ data?: ICharInfo[];
21
+ extraData?: ICharInfo[];
22
+ className?: string;
23
+ style?: React.CSSProperties;
24
+
25
+ /**
26
+ * label 与 value 取值互换 (只作用饼图、环图、雷达图图表)
27
+ */
28
+ reserveValueWithLabelType?: boolean;
29
+
30
+ /**
31
+ * Y 轴起始值
32
+ */
33
+ yStart?: number[];
34
+
35
+ /**
36
+ * 系列配置
37
+ */
38
+ extraSeriesOption?: echarts.SeriesOption[];
39
+
40
+ /**
41
+ * 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
42
+ */
43
+ extraOption?: echarts.EChartsOption;
44
+ }
45
+
46
+ /**
47
+ * 图表类型
48
+ */
49
+ declare enum WinChartType {
50
+ /**
51
+ * MINI面积图
52
+ */
53
+ MINI_AREA,
54
+
55
+ /**
56
+ * 面积图
57
+ */
58
+ AREA,
59
+
60
+ /**
61
+ * 双轴图
62
+ */
63
+ DUAL_LINE_BAR,
64
+
65
+ /**
66
+ * 堆叠双轴图
67
+ */
68
+ STACK_DUAL_LINE_BAR,
69
+
70
+ /**
71
+ * 柱状图
72
+ */
73
+ COLUMN,
74
+
75
+ /**
76
+ * 堆叠柱状图
77
+ */
78
+ STACK_COLUMN,
79
+
80
+ /**
81
+ * 折线图
82
+ */
83
+ LINE,
84
+
85
+ /**
86
+ * 条形图
87
+ */
88
+ BAR,
89
+
90
+ /**
91
+ * 漏斗图
92
+ */
93
+ FUNNEL,
94
+
95
+ /**
96
+ * 饼图
97
+ */
98
+ PIE,
99
+
100
+ /**
101
+ * 环形图
102
+ */
103
+ CYCLE,
104
+
105
+ /**
106
+ * 雷达图
107
+ */
108
+ RADAR,
109
+ }
110
+
4
111
  declare enum WinCardChartType {
5
112
  /**
6
113
  * 指标卡片
@@ -168,114 +275,7 @@ interface IIndicatorCardConfig {
168
275
  size: IndicatorCardSize;
169
276
  }
170
277
 
171
- /**
172
- * 标准图表数据
173
- */
174
- interface ICharInfo$1 {
175
- label: string;
176
- value: number;
177
- type?: string;
178
- }
179
-
180
- interface IWinChartProps$1 {
181
- theme?: 'light' | 'dark';
182
- sort?: 'asc' | 'desc';
183
- color?: string[];
184
- chartType?: WinChartType$1;
185
- xAxisLabelRotate?: number;
186
- xAxisLabelLength?: number;
187
- data?: ICharInfo$1[];
188
- extraData?: ICharInfo$1[];
189
- className?: string;
190
- style?: React.CSSProperties;
191
-
192
- /**
193
- * label 与 value 取值互换 (只作用饼图、环图、雷达图图表)
194
- */
195
- reserveValueWithLabelType?: boolean;
196
-
197
- /**
198
- * Y 轴起始值
199
- */
200
- yStart?: number[];
201
-
202
- /**
203
- * 系列配置
204
- */
205
- extraSeriesOption?: echarts.SeriesOption[];
206
-
207
- /**
208
- * 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
209
- */
210
- extraOption?: echarts.EChartsOption;
211
- }
212
-
213
- /**
214
- * 图表类型
215
- */
216
- declare enum WinChartType$1 {
217
- /**
218
- * MINI面积图
219
- */
220
- MINI_AREA,
221
-
222
- /**
223
- * 面积图
224
- */
225
- AREA,
226
-
227
- /**
228
- * 双轴图
229
- */
230
- DUAL_LINE_BAR,
231
-
232
- /**
233
- * 堆叠双轴图
234
- */
235
- STACK_DUAL_LINE_BAR,
236
-
237
- /**
238
- * 柱状图
239
- */
240
- COLUMN,
241
-
242
- /**
243
- * 堆叠柱状图
244
- */
245
- STACK_COLUMN,
246
-
247
- /**
248
- * 折线图
249
- */
250
- LINE,
251
-
252
- /**
253
- * 条形图
254
- */
255
- BAR,
256
-
257
- /**
258
- * 漏斗图
259
- */
260
- FUNNEL,
261
-
262
- /**
263
- * 饼图
264
- */
265
- PIE,
266
-
267
- /**
268
- * 环形图
269
- */
270
- CYCLE,
271
-
272
- /**
273
- * 雷达图
274
- */
275
- RADAR,
276
- }
277
-
278
- declare const WinChart: ({ className, style, extraOption, theme, ...args }: IWinChartProps$1) => react_jsx_runtime.JSX.Element;
278
+ declare const WinChart: ({ className, style, extraOption, theme, ...args }: IWinChartProps) => react_jsx_runtime.JSX.Element;
279
279
 
280
280
  interface IProps {
281
281
  id: number;
@@ -291,94 +291,4 @@ declare const WinCard: ({ id, config, style, fixSize, context, spanWidth, spanHe
291
291
 
292
292
  declare const VisionUserConfigContext: React$1.Context<IVisionUserConfig>;
293
293
 
294
- /**
295
- * 标准图表数据
296
- */
297
- interface ICharInfo {
298
- label: string;
299
- value: number;
300
- type?: string;
301
- }
302
- interface IWinChartProps {
303
- theme?: 'light' | 'dark';
304
- sort?: 'asc' | 'desc';
305
- color?: string[];
306
- chartType?: WinChartType;
307
- xAxisLabelRotate?: number;
308
- xAxisLabelLength?: number;
309
- data?: ICharInfo[];
310
- extraData?: ICharInfo[];
311
- className?: string;
312
- style?: React.CSSProperties;
313
- /**
314
- * label 与 value 取值互换 (只作用饼图、环图、雷达图图表)
315
- */
316
- reserveValueWithLabelType?: boolean;
317
- /**
318
- * Y 轴起始值
319
- */
320
- yStart?: number[];
321
- /**
322
- * 系列配置
323
- */
324
- extraSeriesOption?: echarts.SeriesOption[];
325
- /**
326
- * 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
327
- */
328
- extraOption?: echarts.EChartsOption;
329
- }
330
- /**
331
- * 图表类型
332
- */
333
- declare enum WinChartType {
334
- /**
335
- * MINI面积图
336
- */
337
- MINI_AREA = 0,
338
- /**
339
- * 面积图
340
- */
341
- AREA = 1,
342
- /**
343
- * 双轴图
344
- */
345
- DUAL_LINE_BAR = 2,
346
- /**
347
- * 堆叠双轴图
348
- */
349
- STACK_DUAL_LINE_BAR = 3,
350
- /**
351
- * 柱状图
352
- */
353
- COLUMN = 4,
354
- /**
355
- * 堆叠柱状图
356
- */
357
- STACK_COLUMN = 5,
358
- /**
359
- * 折线图
360
- */
361
- LINE = 6,
362
- /**
363
- * 条形图
364
- */
365
- BAR = 7,
366
- /**
367
- * 漏斗图
368
- */
369
- FUNNEL = 8,
370
- /**
371
- * 饼图
372
- */
373
- PIE = 9,
374
- /**
375
- * 环形图
376
- */
377
- CYCLE = 10,
378
- /**
379
- * 雷达图
380
- */
381
- RADAR = 11
382
- }
383
-
384
294
  export { type IWinChartProps, VisionUserConfigContext, WinCard, WinChart, WinChartType, WinChart as default };
@@ -1,2 +1,3 @@
1
- import { IWinChartProps } from '@/types';
1
+ import { IWinChartProps, WinChartType } from '@/types';
2
+ export { IWinChartProps, WinChartType };
2
3
  export declare const WinChart: ({ className, style, extraOption, theme, ...args }: IWinChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
- import { WinChart } from './components/win-chart';
1
+ import { WinChart, IWinChartProps, WinChartType } from './components/win-chart';
2
2
  import { WinCard } from './components/win-card';
3
3
  import { VisionUserConfigContext } from './components/VisionUserConfigContext';
4
- import { IWinChartProps, WinChartType } from './types';
5
4
  export { WinChart, WinChartType, IWinChartProps, WinCard, VisionUserConfigContext, };
6
5
  export default WinChart;
@@ -0,0 +1,90 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * 标准图表数据
4
+ */
5
+ export interface ICharInfo {
6
+ label: string;
7
+ value: number;
8
+ type?: string;
9
+ }
10
+ export interface IWinChartProps {
11
+ theme?: 'light' | 'dark';
12
+ sort?: 'asc' | 'desc';
13
+ color?: string[];
14
+ chartType?: WinChartType;
15
+ xAxisLabelRotate?: number;
16
+ xAxisLabelLength?: number;
17
+ data?: ICharInfo[];
18
+ extraData?: ICharInfo[];
19
+ className?: string;
20
+ style?: React.CSSProperties;
21
+ /**
22
+ * label 与 value 取值互换 (只作用饼图、环图、雷达图图表)
23
+ */
24
+ reserveValueWithLabelType?: boolean;
25
+ /**
26
+ * Y 轴起始值
27
+ */
28
+ yStart?: number[];
29
+ /**
30
+ * 系列配置
31
+ */
32
+ extraSeriesOption?: echarts.SeriesOption[];
33
+ /**
34
+ * 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
35
+ */
36
+ extraOption?: echarts.EChartsOption;
37
+ }
38
+ /**
39
+ * 图表类型
40
+ */
41
+ export declare enum WinChartType {
42
+ /**
43
+ * MINI面积图
44
+ */
45
+ MINI_AREA = 0,
46
+ /**
47
+ * 面积图
48
+ */
49
+ AREA = 1,
50
+ /**
51
+ * 双轴图
52
+ */
53
+ DUAL_LINE_BAR = 2,
54
+ /**
55
+ * 堆叠双轴图
56
+ */
57
+ STACK_DUAL_LINE_BAR = 3,
58
+ /**
59
+ * 柱状图
60
+ */
61
+ COLUMN = 4,
62
+ /**
63
+ * 堆叠柱状图
64
+ */
65
+ STACK_COLUMN = 5,
66
+ /**
67
+ * 折线图
68
+ */
69
+ LINE = 6,
70
+ /**
71
+ * 条形图
72
+ */
73
+ BAR = 7,
74
+ /**
75
+ * 漏斗图
76
+ */
77
+ FUNNEL = 8,
78
+ /**
79
+ * 饼图
80
+ */
81
+ PIE = 9,
82
+ /**
83
+ * 环形图
84
+ */
85
+ CYCLE = 10,
86
+ /**
87
+ * 雷达图
88
+ */
89
+ RADAR = 11
90
+ }
@@ -1,5 +1,3 @@
1
- import { CSSProperties } from 'react';
2
- export type Fn = (...args: unknown[]) => unknown;
3
1
  export * from './user';
4
2
  export * from './portal';
5
3
  export * from './indicator';
@@ -7,97 +5,4 @@ export * from './interface';
7
5
  export * from './enum';
8
6
  export * from './type';
9
7
  export * from './report';
10
- /**
11
- * 标准图表数据
12
- */
13
- export interface ICharInfo {
14
- label: string;
15
- value: number;
16
- type?: string;
17
- }
18
- export interface IStyleProps {
19
- style?: CSSProperties;
20
- className?: string;
21
- id?: string;
22
- }
23
- export interface IWinChartProps {
24
- theme?: 'light' | 'dark';
25
- sort?: 'asc' | 'desc';
26
- color?: string[];
27
- chartType?: WinChartType;
28
- xAxisLabelRotate?: number;
29
- xAxisLabelLength?: number;
30
- data?: ICharInfo[];
31
- extraData?: ICharInfo[];
32
- className?: string;
33
- style?: React.CSSProperties;
34
- /**
35
- * label 与 value 取值互换 (只作用饼图、环图、雷达图图表)
36
- */
37
- reserveValueWithLabelType?: boolean;
38
- /**
39
- * Y 轴起始值
40
- */
41
- yStart?: number[];
42
- /**
43
- * 系列配置
44
- */
45
- extraSeriesOption?: echarts.SeriesOption[];
46
- /**
47
- * 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
48
- */
49
- extraOption?: echarts.EChartsOption;
50
- }
51
- /**
52
- * 图表类型
53
- */
54
- export declare enum WinChartType {
55
- /**
56
- * MINI面积图
57
- */
58
- MINI_AREA = 0,
59
- /**
60
- * 面积图
61
- */
62
- AREA = 1,
63
- /**
64
- * 双轴图
65
- */
66
- DUAL_LINE_BAR = 2,
67
- /**
68
- * 堆叠双轴图
69
- */
70
- STACK_DUAL_LINE_BAR = 3,
71
- /**
72
- * 柱状图
73
- */
74
- COLUMN = 4,
75
- /**
76
- * 堆叠柱状图
77
- */
78
- STACK_COLUMN = 5,
79
- /**
80
- * 折线图
81
- */
82
- LINE = 6,
83
- /**
84
- * 条形图
85
- */
86
- BAR = 7,
87
- /**
88
- * 漏斗图
89
- */
90
- FUNNEL = 8,
91
- /**
92
- * 饼图
93
- */
94
- PIE = 9,
95
- /**
96
- * 环形图
97
- */
98
- CYCLE = 10,
99
- /**
100
- * 雷达图
101
- */
102
- RADAR = 11
103
- }
8
+ export * from './chart';
@@ -1,4 +1,4 @@
1
- import { ICharInfo } from '.';
1
+ import { ICharInfo } from './chart';
2
2
  import { WinCardChartType } from './enum';
3
3
  import { IListItem } from './interface';
4
4
  import { WinCardStatus } from './type';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "win-chart",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "菜鸟地网统一图表组件",
5
5
  "files": [
6
6
  "dist"
@@ -25,9 +25,6 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@cainiaofe/cn-ui": "^0.11.16",
28
- "@ice/jsx-runtime": "^0.2.0",
29
- "@ice/stark": "^2.7.3",
30
- "@swc/helpers": "^0.5.1",
31
28
  "ahooks": "^3.7.8",
32
29
  "axios": "^1.6.7",
33
30
  "d3": "^7.8.5",
@@ -42,8 +39,6 @@
42
39
  "styled-components": "^6.1.8"
43
40
  },
44
41
  "devDependencies": {
45
- "@ice/pkg": "^1.0.0",
46
- "@ice/runtime": "^1.0.0",
47
42
  "@rollup/plugin-alias": "^5.1.0",
48
43
  "@rollup/plugin-commonjs": "^25.0.7",
49
44
  "@rollup/plugin-image": "^3.0.3",
@@ -56,6 +51,7 @@
56
51
  "rollup": "^4.13.0",
57
52
  "rollup-plugin-dts": "^6.1.0",
58
53
  "rollup-plugin-postcss": "^4.0.2",
54
+ "rollup-plugin-progress": "^1.1.2",
59
55
  "rollup-plugin-terser": "^7.0.2"
60
56
  },
61
57
  "peerDependencies": {