win-chart 2.0.0 → 2.0.1
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 +274 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,280 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { IWinChartProps as IWinChartProps$1, IIndicatorCardConfig, IVisionUserConfig } from '@/types';
|
|
3
2
|
import React$1, { CSSProperties } from 'react';
|
|
4
3
|
|
|
4
|
+
declare enum WinCardChartType {
|
|
5
|
+
/**
|
|
6
|
+
* 指标卡片
|
|
7
|
+
*/
|
|
8
|
+
INDICATOR = 'INDICATOR',
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 指标加面积图
|
|
12
|
+
*/
|
|
13
|
+
INDICATOR_AREA = 'INDICATOR_AREA',
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 指标加面积图
|
|
17
|
+
*/
|
|
18
|
+
AREA_CHART = 'AREA_CHART',
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 折线图卡片
|
|
22
|
+
*/
|
|
23
|
+
LINE_CHART = 'LINE_CHART',
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 柱状图
|
|
27
|
+
*/
|
|
28
|
+
COLUMN_CHART = 'COLUMN_CHART',
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 堆叠柱状图
|
|
32
|
+
*/
|
|
33
|
+
STACK_COLUMN_CHART = 'STACK_COLUMN_CHART',
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 条形图
|
|
37
|
+
*/
|
|
38
|
+
BAR_CHART = 'BAR_CHART',
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 双轴图
|
|
42
|
+
*/
|
|
43
|
+
DUAL_LINE_BAR_CHART = 'DUAL_LINE_COLUMN_CHART',
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 漏斗图
|
|
47
|
+
*/
|
|
48
|
+
FUNNEL_CHART = 'FUNNEL_CHART',
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 饼图
|
|
52
|
+
*/
|
|
53
|
+
PIE_CHART = 'PIE_CHART',
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 饼图(以指标项展示)
|
|
57
|
+
*/
|
|
58
|
+
PIE_CHART_RESERVE = 'PIE_CHART_RESERVE',
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 环图
|
|
62
|
+
*/
|
|
63
|
+
CYCLE_CHART = 'CYCLE_CHART',
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 雷达图
|
|
67
|
+
*/
|
|
68
|
+
RADAR_CHART = 'RADAR_CHART',
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 雷达图(以指标项展示)
|
|
72
|
+
*/
|
|
73
|
+
RADAR_CHART_RESERVE = 'RADAR_CHART_RESERVE',
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 自定义卡片
|
|
77
|
+
*/
|
|
78
|
+
CUSTOM_CARD = 'CUSTOM_CARD',
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface IVisionUserConfig {
|
|
82
|
+
[p: string]: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 页面状态
|
|
87
|
+
*/
|
|
88
|
+
type WinCardStatus = 'ONLINE' | 'OFFLINE';
|
|
89
|
+
|
|
90
|
+
interface IIndicatorConfig {
|
|
91
|
+
id: number;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 单位
|
|
95
|
+
*/
|
|
96
|
+
unit: string;
|
|
97
|
+
/**
|
|
98
|
+
* 指标所在侧 0 左 1 右
|
|
99
|
+
*/
|
|
100
|
+
yAxis: number;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 指标别名
|
|
104
|
+
*/
|
|
105
|
+
alias?: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 是否堆叠
|
|
109
|
+
*/
|
|
110
|
+
isStack?: boolean;
|
|
111
|
+
|
|
112
|
+
extra?: {
|
|
113
|
+
/**
|
|
114
|
+
* 默认 0 日期 0 目标 1
|
|
115
|
+
*/
|
|
116
|
+
subTitle: number;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
type IndicatorCardSize = 'min' | 'medium' | 'max';
|
|
121
|
+
|
|
122
|
+
interface IIndicatorCardConfig {
|
|
123
|
+
subscribed?: boolean;
|
|
124
|
+
name: string;
|
|
125
|
+
id: number;
|
|
126
|
+
type: string;
|
|
127
|
+
dataAccCode: string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 业务分类
|
|
131
|
+
*/
|
|
132
|
+
bizCode: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 卡片类型
|
|
136
|
+
*/
|
|
137
|
+
chartType: WinCardChartType;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* 占多少个网格
|
|
141
|
+
*/
|
|
142
|
+
colWidth: number;
|
|
143
|
+
colHeight: number;
|
|
144
|
+
description: string;
|
|
145
|
+
detailUrl: string;
|
|
146
|
+
status: WinCardStatus;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 排序
|
|
150
|
+
*/
|
|
151
|
+
rankOrder: number;
|
|
152
|
+
commonConfig: {
|
|
153
|
+
orgLevel: string;
|
|
154
|
+
labelField: string;
|
|
155
|
+
limit: number;
|
|
156
|
+
color?: string[];
|
|
157
|
+
yStart?: number[];
|
|
158
|
+
xAxisLabelRotate?: number;
|
|
159
|
+
xAxisLabelLength?: number;
|
|
160
|
+
sort?: 'asc' | 'desc';
|
|
161
|
+
};
|
|
162
|
+
indicatorConfig: IIndicatorConfig[];
|
|
163
|
+
sizeMap: {
|
|
164
|
+
min: [1, 2];
|
|
165
|
+
medium: [1, 4];
|
|
166
|
+
max: [2, 4];
|
|
167
|
+
};
|
|
168
|
+
size: IndicatorCardSize;
|
|
169
|
+
}
|
|
170
|
+
|
|
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
|
+
|
|
5
278
|
declare const WinChart: ({ className, style, extraOption, theme, ...args }: IWinChartProps$1) => react_jsx_runtime.JSX.Element;
|
|
6
279
|
|
|
7
280
|
interface IProps {
|