win-chart 2.3.1 → 2.3.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/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import React$1, { CSSProperties } from 'react';
|
|
|
4
4
|
/**
|
|
5
5
|
* 标准图表数据
|
|
6
6
|
*/
|
|
7
|
-
interface
|
|
7
|
+
interface IChartInfo {
|
|
8
8
|
label: string;
|
|
9
9
|
value: number;
|
|
10
10
|
type?: string;
|
|
@@ -17,8 +17,8 @@ interface IWinChartProps {
|
|
|
17
17
|
chartType?: WinChartType;
|
|
18
18
|
xAxisLabelRotate?: number;
|
|
19
19
|
xAxisLabelLength?: number;
|
|
20
|
-
data?:
|
|
21
|
-
extraData?:
|
|
20
|
+
data?: IChartInfo[];
|
|
21
|
+
extraData?: IChartInfo[];
|
|
22
22
|
className?: string;
|
|
23
23
|
style?: React.CSSProperties;
|
|
24
24
|
|
|
@@ -291,4 +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
|
-
export { type IWinChartProps, VisionUserConfigContext, WinCard, WinChart, WinChartType, WinChart as default };
|
|
294
|
+
export { type IChartInfo as ICharInfo, type IWinChartProps, VisionUserConfigContext, WinCard, WinChart, WinChartType, WinChart as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IWinChartProps, WinChartType } from '@/types';
|
|
2
|
-
export { IWinChartProps, WinChartType };
|
|
1
|
+
import { IWinChartProps, WinChartType, IChartInfo } from '@/types';
|
|
2
|
+
export { IWinChartProps, WinChartType, IChartInfo as ICharInfo };
|
|
3
3
|
export declare const WinChart: ({ theme, className, style, extraOption, extraSeriesOption, ...args }: IWinChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IChartInfo, IWinChartProps } from '@/types';
|
|
2
2
|
/**
|
|
3
3
|
* 数据转百分比
|
|
4
4
|
* @param value
|
|
@@ -27,7 +27,7 @@ export declare const checkEntityArr: (data: unknown) => boolean;
|
|
|
27
27
|
* @param data
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
export declare const dataDescOrder: (data?:
|
|
30
|
+
export declare const dataDescOrder: (data?: IChartInfo[]) => IChartInfo[];
|
|
31
31
|
/**
|
|
32
32
|
* 获取 X 轴配置
|
|
33
33
|
* @param winChartProps
|
|
@@ -40,14 +40,14 @@ export declare const getAxisOpt: (winChartProps: IWinChartProps) => echarts.XAXi
|
|
|
40
40
|
* @param order
|
|
41
41
|
* @returns
|
|
42
42
|
*/
|
|
43
|
-
export declare const sortArray: (arr:
|
|
43
|
+
export declare const sortArray: (arr: IChartInfo[], order: 'asc' | 'desc') => IChartInfo[];
|
|
44
44
|
/**
|
|
45
45
|
* 根据 label 排序
|
|
46
46
|
* @param arr
|
|
47
47
|
* @param sortedLabels
|
|
48
48
|
* @returns
|
|
49
49
|
*/
|
|
50
|
-
export declare const sortArrayByLabel: (arr:
|
|
50
|
+
export declare const sortArrayByLabel: (arr: IChartInfo[], sortedLabels: string[]) => IChartInfo[];
|
|
51
51
|
/**
|
|
52
52
|
* 处理数据排序
|
|
53
53
|
* @param winChartProps
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WinChart, IWinChartProps,
|
|
1
|
+
import { WinChart, WinChartType, IWinChartProps, ICharInfo } from './components/win-chart';
|
|
2
2
|
import { WinCard } from './components/win-card';
|
|
3
3
|
import { VisionUserConfigContext } from './components/VisionUserConfigContext';
|
|
4
|
-
export { WinChart, WinChartType, IWinChartProps, WinCard, VisionUserConfigContext, };
|
|
4
|
+
export { WinChart, WinChartType, IWinChartProps, ICharInfo, WinCard, VisionUserConfigContext, };
|
|
5
5
|
export default WinChart;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 标准图表数据
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface IChartInfo {
|
|
6
6
|
label: string;
|
|
7
7
|
value: number;
|
|
8
8
|
type?: string;
|
|
@@ -14,8 +14,8 @@ export interface IWinChartProps {
|
|
|
14
14
|
chartType?: WinChartType;
|
|
15
15
|
xAxisLabelRotate?: number;
|
|
16
16
|
xAxisLabelLength?: number;
|
|
17
|
-
data?:
|
|
18
|
-
extraData?:
|
|
17
|
+
data?: IChartInfo[];
|
|
18
|
+
extraData?: IChartInfo[];
|
|
19
19
|
className?: string;
|
|
20
20
|
style?: React.CSSProperties;
|
|
21
21
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IChartInfo } from './chart';
|
|
2
2
|
import { WinCardChartType } from './enum';
|
|
3
3
|
import { IListItem } from './interface';
|
|
4
4
|
import { WinCardStatus } from './type';
|
|
@@ -73,7 +73,7 @@ export interface IIndicatorCardConfig {
|
|
|
73
73
|
};
|
|
74
74
|
size: IndicatorCardSize;
|
|
75
75
|
}
|
|
76
|
-
interface IIndicatorListInfo extends
|
|
76
|
+
interface IIndicatorListInfo extends IChartInfo {
|
|
77
77
|
indicatorId: number;
|
|
78
78
|
}
|
|
79
79
|
export interface IIndicatorDataInfo {
|
|
@@ -83,7 +83,7 @@ export interface IIndicatorDataInfo {
|
|
|
83
83
|
value: string;
|
|
84
84
|
expected: string;
|
|
85
85
|
};
|
|
86
|
-
list0?:
|
|
86
|
+
list0?: IChartInfo[];
|
|
87
87
|
list1?: IIndicatorListInfo[];
|
|
88
88
|
}
|
|
89
89
|
export interface IIndicatorInfo {
|