x-next 1.7.0 → 1.8.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/AI_USAGE.md +129 -4
- package/CHANGELOG.md +47 -0
- package/dist/_hooks/use-chart-size.d.ts +25 -0
- package/dist/_utils/chart/index.d.ts +6 -0
- package/dist/_utils/chart/padding.d.ts +15 -0
- package/dist/_utils/chart/path.d.ts +34 -0
- package/dist/_utils/chart/scale.d.ts +55 -0
- package/dist/components/_components/chart/ChartAxis.d.ts +85 -0
- package/dist/components/_components/chart/ChartLegend.d.ts +26 -0
- package/dist/components/_components/chart/ChartTooltip.d.ts +76 -0
- package/dist/components/_components/chart/colors.d.ts +10 -0
- package/dist/components/_components/chart/interface.d.ts +38 -0
- package/dist/components/bar-chart/BarChart.d.ts +278 -0
- package/dist/components/bar-chart/helpers/layout.d.ts +55 -0
- package/dist/components/bar-chart/index.d.ts +600 -0
- package/dist/components/bar-chart/interface.d.ts +74 -0
- package/dist/components/bar-chart/props.d.ts +145 -0
- package/dist/components/heatmap/Heatmap.d.ts +10 -1
- package/dist/components/heatmap/index.d.ts +30 -3
- package/dist/components/index.d.ts +3 -0
- package/dist/components/line-chart/LineChart.d.ts +295 -0
- package/dist/components/line-chart/helpers/layout.d.ts +74 -0
- package/dist/components/line-chart/index.d.ts +614 -0
- package/dist/components/line-chart/interface.d.ts +76 -0
- package/dist/components/line-chart/props.d.ts +173 -0
- package/dist/components/pie-chart/PieChart.d.ts +219 -0
- package/dist/components/pie-chart/index.d.ts +470 -0
- package/dist/components/pie-chart/interface.d.ts +58 -0
- package/dist/components/pie-chart/props.d.ts +107 -0
- package/dist/components/trend-chart/components/TrendChart.d.ts +19 -96
- package/dist/components/trend-chart/index.d.ts +33 -187
- package/dist/components/trend-chart/props.d.ts +9 -78
- package/dist/components/trend-chart/themes.d.ts +0 -1
- package/dist/es/_hooks/use-chart-size.js +25 -0
- package/dist/es/_styles/palette-aliases.js +5 -0
- package/dist/es/_utils/chart/padding.js +22 -0
- package/dist/es/_utils/chart/path.js +69 -0
- package/dist/es/_utils/chart/scale.js +77 -0
- package/dist/es/components/_components/chart/ChartAxis.js +79 -0
- package/dist/es/components/_components/chart/ChartLegend.js +53 -0
- package/dist/es/components/_components/chart/ChartTooltip.js +64 -0
- package/dist/es/components/_components/chart/colors.js +12 -0
- package/dist/es/components/bar-chart/BarChart.js +470 -0
- package/dist/es/components/bar-chart/helpers/layout.js +53 -0
- package/dist/es/components/bar-chart/index.js +8 -0
- package/dist/es/components/bar-chart/props.js +148 -0
- package/dist/es/components/heatmap/Heatmap.js +249 -172
- package/dist/es/components/index.js +132 -126
- package/dist/es/components/line-chart/LineChart.js +532 -0
- package/dist/es/components/line-chart/helpers/layout.js +80 -0
- package/dist/es/components/line-chart/index.js +8 -0
- package/dist/es/components/line-chart/props.js +178 -0
- package/dist/es/components/pie-chart/PieChart.js +397 -0
- package/dist/es/components/pie-chart/index.js +8 -0
- package/dist/es/components/pie-chart/props.js +104 -0
- package/dist/es/components/trend-chart/components/TrendChart.js +143 -183
- package/dist/es/components/trend-chart/components/trend-chart-curve.js +85 -81
- package/dist/es/components/trend-chart/props.js +28 -74
- package/dist/es/components/trend-chart/themes.js +30 -31
- package/dist/es/index.js +193 -187
- package/dist/es/locale/en-US.js +8 -1
- package/dist/es/locale/zh-CN.js +8 -1
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +13 -0
- package/dist/style/bar-chart.css +1 -0
- package/dist/style/bar-chart.js +2 -0
- package/dist/style/base.css +1 -1
- package/dist/style/heatmap.css +1 -1
- package/dist/style/line-chart.css +1 -0
- package/dist/style/line-chart.js +2 -0
- package/dist/style/pie-chart.css +1 -0
- package/dist/style/pie-chart.js +2 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
- package/volar.d.ts +3 -0
- package/dist/components/trend-chart/components/trend-chart-grid.d.ts +0 -55
- package/dist/components/trend-chart/components/trend-chart-labels.d.ts +0 -26
- package/dist/components/trend-chart/helpers/genPath.d.ts +0 -8
- package/dist/components/trend-chart/helpers/getPadding.d.ts +0 -8
- package/dist/components/trend-chart/helpers/validatePadding.d.ts +0 -2
- package/dist/es/components/trend-chart/components/trend-chart-grid.js +0 -62
- package/dist/es/components/trend-chart/components/trend-chart-labels.js +0 -75
- package/dist/es/components/trend-chart/helpers/genPath.js +0 -22
- package/dist/es/components/trend-chart/helpers/getPadding.js +0 -21
- package/dist/es/components/trend-chart/helpers/validatePadding.js +0 -7
|
@@ -17,14 +17,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
17
17
|
type: import('vue').PropType<number | string>;
|
|
18
18
|
default: string;
|
|
19
19
|
};
|
|
20
|
-
grid: {
|
|
21
|
-
default: null;
|
|
22
|
-
type: import('vue').PropType<import('../props').Grid>;
|
|
23
|
-
};
|
|
24
|
-
labels: {
|
|
25
|
-
default: null;
|
|
26
|
-
type: import('vue').PropType<import('../props').Labels>;
|
|
27
|
-
};
|
|
28
20
|
max: {
|
|
29
21
|
type: NumberConstructor;
|
|
30
22
|
};
|
|
@@ -68,6 +60,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
68
60
|
ariaLabel: {
|
|
69
61
|
type: StringConstructor;
|
|
70
62
|
};
|
|
63
|
+
grid: {
|
|
64
|
+
default: null;
|
|
65
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
66
|
+
};
|
|
67
|
+
labels: {
|
|
68
|
+
default: null;
|
|
69
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
70
|
+
};
|
|
71
71
|
theme: {
|
|
72
72
|
type: import('vue').PropType<Theme>;
|
|
73
73
|
default: () => {};
|
|
@@ -95,14 +95,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
95
95
|
type: import('vue').PropType<number | string>;
|
|
96
96
|
default: string;
|
|
97
97
|
};
|
|
98
|
-
grid: {
|
|
99
|
-
default: null;
|
|
100
|
-
type: import('vue').PropType<import('../props').Grid>;
|
|
101
|
-
};
|
|
102
|
-
labels: {
|
|
103
|
-
default: null;
|
|
104
|
-
type: import('vue').PropType<import('../props').Labels>;
|
|
105
|
-
};
|
|
106
98
|
max: {
|
|
107
99
|
type: NumberConstructor;
|
|
108
100
|
};
|
|
@@ -146,6 +138,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
146
138
|
ariaLabel: {
|
|
147
139
|
type: StringConstructor;
|
|
148
140
|
};
|
|
141
|
+
grid: {
|
|
142
|
+
default: null;
|
|
143
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
144
|
+
};
|
|
145
|
+
labels: {
|
|
146
|
+
default: null;
|
|
147
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
148
|
+
};
|
|
149
149
|
theme: {
|
|
150
150
|
type: import('vue').PropType<Theme>;
|
|
151
151
|
default: () => {};
|
|
@@ -160,95 +160,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
160
160
|
status: import('../props').TrendChartStatus;
|
|
161
161
|
height: string | number;
|
|
162
162
|
width: string | number;
|
|
163
|
-
grid:
|
|
163
|
+
grid: Record<string, unknown> | null;
|
|
164
164
|
padding: string | number;
|
|
165
165
|
stroke: boolean;
|
|
166
166
|
smooth: boolean;
|
|
167
167
|
tooltip: boolean;
|
|
168
168
|
dataset: import('../props').DataSet;
|
|
169
|
+
labels: Record<string, unknown> | null;
|
|
169
170
|
theme: Theme;
|
|
170
|
-
interactive: boolean;
|
|
171
171
|
showPoints: import('../props').ShowPoints;
|
|
172
|
+
interactive: boolean;
|
|
172
173
|
tooltipFormatter: (value: number) => string;
|
|
173
|
-
labels: import('../props').Labels;
|
|
174
174
|
}, {}, {
|
|
175
|
-
TrendChartGrid: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
176
|
-
boundary: {
|
|
177
|
-
required: boolean;
|
|
178
|
-
type: import('vue').PropType<import('../props').Boundary>;
|
|
179
|
-
default: () => void;
|
|
180
|
-
};
|
|
181
|
-
verticalLines: {
|
|
182
|
-
default: boolean;
|
|
183
|
-
type: BooleanConstructor;
|
|
184
|
-
};
|
|
185
|
-
verticalLinesNumber: {
|
|
186
|
-
default: number;
|
|
187
|
-
type: NumberConstructor;
|
|
188
|
-
};
|
|
189
|
-
horizontalLines: {
|
|
190
|
-
default: boolean;
|
|
191
|
-
type: BooleanConstructor;
|
|
192
|
-
};
|
|
193
|
-
horizontalLinesNumber: {
|
|
194
|
-
default: number;
|
|
195
|
-
type: NumberConstructor;
|
|
196
|
-
};
|
|
197
|
-
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
198
|
-
[key: string]: any;
|
|
199
|
-
}> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
200
|
-
boundary: {
|
|
201
|
-
required: boolean;
|
|
202
|
-
type: import('vue').PropType<import('../props').Boundary>;
|
|
203
|
-
default: () => void;
|
|
204
|
-
};
|
|
205
|
-
verticalLines: {
|
|
206
|
-
default: boolean;
|
|
207
|
-
type: BooleanConstructor;
|
|
208
|
-
};
|
|
209
|
-
verticalLinesNumber: {
|
|
210
|
-
default: number;
|
|
211
|
-
type: NumberConstructor;
|
|
212
|
-
};
|
|
213
|
-
horizontalLines: {
|
|
214
|
-
default: boolean;
|
|
215
|
-
type: BooleanConstructor;
|
|
216
|
-
};
|
|
217
|
-
horizontalLinesNumber: {
|
|
218
|
-
default: number;
|
|
219
|
-
type: NumberConstructor;
|
|
220
|
-
};
|
|
221
|
-
}>> & Readonly<{}>, {
|
|
222
|
-
boundary: import('../props').Boundary;
|
|
223
|
-
verticalLines: boolean;
|
|
224
|
-
verticalLinesNumber: number;
|
|
225
|
-
horizontalLines: boolean;
|
|
226
|
-
horizontalLinesNumber: number;
|
|
227
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
228
|
-
TrendChartLabels: import('vue').DefineComponent<{
|
|
229
|
-
boundary: import('../props').Boundary;
|
|
230
|
-
yLabelsTextFormatter: Function;
|
|
231
|
-
color?: import('../../../_props/css.ts').CSSColor | undefined;
|
|
232
|
-
fontSize?: number | undefined;
|
|
233
|
-
minValue?: number | undefined;
|
|
234
|
-
maxValue?: number | undefined;
|
|
235
|
-
xLabels?: unknown[] | undefined;
|
|
236
|
-
yLabels?: number | undefined;
|
|
237
|
-
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
238
|
-
[key: string]: any;
|
|
239
|
-
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
240
|
-
boundary: import('../props').Boundary;
|
|
241
|
-
yLabelsTextFormatter: Function;
|
|
242
|
-
color?: import('../../../_props/css.ts').CSSColor | undefined;
|
|
243
|
-
fontSize?: number | undefined;
|
|
244
|
-
minValue?: number | undefined;
|
|
245
|
-
maxValue?: number | undefined;
|
|
246
|
-
xLabels?: unknown[] | undefined;
|
|
247
|
-
yLabels?: number | undefined;
|
|
248
|
-
}> & Readonly<{}>, {
|
|
249
|
-
boundary: import('../props').Boundary;
|
|
250
|
-
yLabelsTextFormatter: Function;
|
|
251
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
252
175
|
TrendChartCurve: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
253
176
|
boundary: {
|
|
254
177
|
required: boolean;
|
|
@@ -17,14 +17,6 @@ export declare const TrendChart: {
|
|
|
17
17
|
type: import('vue').PropType<number | string>;
|
|
18
18
|
default: string;
|
|
19
19
|
};
|
|
20
|
-
grid: {
|
|
21
|
-
default: null;
|
|
22
|
-
type: import('vue').PropType<import('./props').Grid>;
|
|
23
|
-
};
|
|
24
|
-
labels: {
|
|
25
|
-
default: null;
|
|
26
|
-
type: import('vue').PropType<import('./props').Labels>;
|
|
27
|
-
};
|
|
28
20
|
max: {
|
|
29
21
|
type: NumberConstructor;
|
|
30
22
|
};
|
|
@@ -68,6 +60,14 @@ export declare const TrendChart: {
|
|
|
68
60
|
ariaLabel: {
|
|
69
61
|
type: StringConstructor;
|
|
70
62
|
};
|
|
63
|
+
grid: {
|
|
64
|
+
default: null;
|
|
65
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
66
|
+
};
|
|
67
|
+
labels: {
|
|
68
|
+
default: null;
|
|
69
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
70
|
+
};
|
|
71
71
|
theme: {
|
|
72
72
|
type: import('vue').PropType<import('./props').Theme>;
|
|
73
73
|
default: () => {};
|
|
@@ -87,95 +87,18 @@ export declare const TrendChart: {
|
|
|
87
87
|
status: import('./props').TrendChartStatus;
|
|
88
88
|
height: string | number;
|
|
89
89
|
width: string | number;
|
|
90
|
-
grid:
|
|
90
|
+
grid: Record<string, unknown> | null;
|
|
91
91
|
padding: string | number;
|
|
92
92
|
stroke: boolean;
|
|
93
93
|
smooth: boolean;
|
|
94
94
|
tooltip: boolean;
|
|
95
95
|
dataset: import('./props').DataSet;
|
|
96
|
+
labels: Record<string, unknown> | null;
|
|
96
97
|
theme: import('./props').Theme;
|
|
97
|
-
interactive: boolean;
|
|
98
98
|
showPoints: import('./props').ShowPoints;
|
|
99
|
+
interactive: boolean;
|
|
99
100
|
tooltipFormatter: (value: number) => string;
|
|
100
|
-
labels: import('./props').Labels;
|
|
101
101
|
}, true, {}, {}, {
|
|
102
|
-
TrendChartGrid: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
103
|
-
boundary: {
|
|
104
|
-
required: boolean;
|
|
105
|
-
type: import('vue').PropType<import('./props').Boundary>;
|
|
106
|
-
default: () => void;
|
|
107
|
-
};
|
|
108
|
-
verticalLines: {
|
|
109
|
-
default: boolean;
|
|
110
|
-
type: BooleanConstructor;
|
|
111
|
-
};
|
|
112
|
-
verticalLinesNumber: {
|
|
113
|
-
default: number;
|
|
114
|
-
type: NumberConstructor;
|
|
115
|
-
};
|
|
116
|
-
horizontalLines: {
|
|
117
|
-
default: boolean;
|
|
118
|
-
type: BooleanConstructor;
|
|
119
|
-
};
|
|
120
|
-
horizontalLinesNumber: {
|
|
121
|
-
default: number;
|
|
122
|
-
type: NumberConstructor;
|
|
123
|
-
};
|
|
124
|
-
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
125
|
-
[key: string]: any;
|
|
126
|
-
}> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
127
|
-
boundary: {
|
|
128
|
-
required: boolean;
|
|
129
|
-
type: import('vue').PropType<import('./props').Boundary>;
|
|
130
|
-
default: () => void;
|
|
131
|
-
};
|
|
132
|
-
verticalLines: {
|
|
133
|
-
default: boolean;
|
|
134
|
-
type: BooleanConstructor;
|
|
135
|
-
};
|
|
136
|
-
verticalLinesNumber: {
|
|
137
|
-
default: number;
|
|
138
|
-
type: NumberConstructor;
|
|
139
|
-
};
|
|
140
|
-
horizontalLines: {
|
|
141
|
-
default: boolean;
|
|
142
|
-
type: BooleanConstructor;
|
|
143
|
-
};
|
|
144
|
-
horizontalLinesNumber: {
|
|
145
|
-
default: number;
|
|
146
|
-
type: NumberConstructor;
|
|
147
|
-
};
|
|
148
|
-
}>> & Readonly<{}>, {
|
|
149
|
-
boundary: import('./props').Boundary;
|
|
150
|
-
verticalLines: boolean;
|
|
151
|
-
verticalLinesNumber: number;
|
|
152
|
-
horizontalLines: boolean;
|
|
153
|
-
horizontalLinesNumber: number;
|
|
154
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
155
|
-
TrendChartLabels: import('vue').DefineComponent<{
|
|
156
|
-
boundary: import('./props').Boundary;
|
|
157
|
-
yLabelsTextFormatter: Function;
|
|
158
|
-
color?: import('../../_props/css').CSSColor | undefined;
|
|
159
|
-
fontSize?: number | undefined;
|
|
160
|
-
minValue?: number | undefined;
|
|
161
|
-
maxValue?: number | undefined;
|
|
162
|
-
xLabels?: unknown[] | undefined;
|
|
163
|
-
yLabels?: number | undefined;
|
|
164
|
-
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
165
|
-
[key: string]: any;
|
|
166
|
-
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
167
|
-
boundary: import('./props').Boundary;
|
|
168
|
-
yLabelsTextFormatter: Function;
|
|
169
|
-
color?: import('../../_props/css').CSSColor | undefined;
|
|
170
|
-
fontSize?: number | undefined;
|
|
171
|
-
minValue?: number | undefined;
|
|
172
|
-
maxValue?: number | undefined;
|
|
173
|
-
xLabels?: unknown[] | undefined;
|
|
174
|
-
yLabels?: number | undefined;
|
|
175
|
-
}> & Readonly<{}>, {
|
|
176
|
-
boundary: import('./props').Boundary;
|
|
177
|
-
yLabelsTextFormatter: Function;
|
|
178
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
179
102
|
TrendChartCurve: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
180
103
|
boundary: {
|
|
181
104
|
required: boolean;
|
|
@@ -335,14 +258,6 @@ export declare const TrendChart: {
|
|
|
335
258
|
type: import('vue').PropType<number | string>;
|
|
336
259
|
default: string;
|
|
337
260
|
};
|
|
338
|
-
grid: {
|
|
339
|
-
default: null;
|
|
340
|
-
type: import('vue').PropType<import('./props').Grid>;
|
|
341
|
-
};
|
|
342
|
-
labels: {
|
|
343
|
-
default: null;
|
|
344
|
-
type: import('vue').PropType<import('./props').Labels>;
|
|
345
|
-
};
|
|
346
261
|
max: {
|
|
347
262
|
type: NumberConstructor;
|
|
348
263
|
};
|
|
@@ -386,6 +301,14 @@ export declare const TrendChart: {
|
|
|
386
301
|
ariaLabel: {
|
|
387
302
|
type: StringConstructor;
|
|
388
303
|
};
|
|
304
|
+
grid: {
|
|
305
|
+
default: null;
|
|
306
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
307
|
+
};
|
|
308
|
+
labels: {
|
|
309
|
+
default: null;
|
|
310
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
311
|
+
};
|
|
389
312
|
theme: {
|
|
390
313
|
type: import('vue').PropType<import('./props').Theme>;
|
|
391
314
|
default: () => {};
|
|
@@ -400,17 +323,17 @@ export declare const TrendChart: {
|
|
|
400
323
|
status: import('./props').TrendChartStatus;
|
|
401
324
|
height: string | number;
|
|
402
325
|
width: string | number;
|
|
403
|
-
grid:
|
|
326
|
+
grid: Record<string, unknown> | null;
|
|
404
327
|
padding: string | number;
|
|
405
328
|
stroke: boolean;
|
|
406
329
|
smooth: boolean;
|
|
407
330
|
tooltip: boolean;
|
|
408
331
|
dataset: import('./props').DataSet;
|
|
332
|
+
labels: Record<string, unknown> | null;
|
|
409
333
|
theme: import('./props').Theme;
|
|
410
|
-
interactive: boolean;
|
|
411
334
|
showPoints: import('./props').ShowPoints;
|
|
335
|
+
interactive: boolean;
|
|
412
336
|
tooltipFormatter: (value: number) => string;
|
|
413
|
-
labels: import('./props').Labels;
|
|
414
337
|
}>;
|
|
415
338
|
__isFragment?: never;
|
|
416
339
|
__isTeleport?: never;
|
|
@@ -433,14 +356,6 @@ export declare const TrendChart: {
|
|
|
433
356
|
type: import('vue').PropType<number | string>;
|
|
434
357
|
default: string;
|
|
435
358
|
};
|
|
436
|
-
grid: {
|
|
437
|
-
default: null;
|
|
438
|
-
type: import('vue').PropType<import('./props').Grid>;
|
|
439
|
-
};
|
|
440
|
-
labels: {
|
|
441
|
-
default: null;
|
|
442
|
-
type: import('vue').PropType<import('./props').Labels>;
|
|
443
|
-
};
|
|
444
359
|
max: {
|
|
445
360
|
type: NumberConstructor;
|
|
446
361
|
};
|
|
@@ -484,6 +399,14 @@ export declare const TrendChart: {
|
|
|
484
399
|
ariaLabel: {
|
|
485
400
|
type: StringConstructor;
|
|
486
401
|
};
|
|
402
|
+
grid: {
|
|
403
|
+
default: null;
|
|
404
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
405
|
+
};
|
|
406
|
+
labels: {
|
|
407
|
+
default: null;
|
|
408
|
+
type: import('vue').PropType<Record<string, unknown> | null>;
|
|
409
|
+
};
|
|
487
410
|
theme: {
|
|
488
411
|
type: import('vue').PropType<import('./props').Theme>;
|
|
489
412
|
default: () => {};
|
|
@@ -503,95 +426,18 @@ export declare const TrendChart: {
|
|
|
503
426
|
status: import('./props').TrendChartStatus;
|
|
504
427
|
height: string | number;
|
|
505
428
|
width: string | number;
|
|
506
|
-
grid:
|
|
429
|
+
grid: Record<string, unknown> | null;
|
|
507
430
|
padding: string | number;
|
|
508
431
|
stroke: boolean;
|
|
509
432
|
smooth: boolean;
|
|
510
433
|
tooltip: boolean;
|
|
511
434
|
dataset: import('./props').DataSet;
|
|
435
|
+
labels: Record<string, unknown> | null;
|
|
512
436
|
theme: import('./props').Theme;
|
|
513
|
-
interactive: boolean;
|
|
514
437
|
showPoints: import('./props').ShowPoints;
|
|
438
|
+
interactive: boolean;
|
|
515
439
|
tooltipFormatter: (value: number) => string;
|
|
516
|
-
labels: import('./props').Labels;
|
|
517
440
|
}, {}, string, {}, {
|
|
518
|
-
TrendChartGrid: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
519
|
-
boundary: {
|
|
520
|
-
required: boolean;
|
|
521
|
-
type: import('vue').PropType<import('./props').Boundary>;
|
|
522
|
-
default: () => void;
|
|
523
|
-
};
|
|
524
|
-
verticalLines: {
|
|
525
|
-
default: boolean;
|
|
526
|
-
type: BooleanConstructor;
|
|
527
|
-
};
|
|
528
|
-
verticalLinesNumber: {
|
|
529
|
-
default: number;
|
|
530
|
-
type: NumberConstructor;
|
|
531
|
-
};
|
|
532
|
-
horizontalLines: {
|
|
533
|
-
default: boolean;
|
|
534
|
-
type: BooleanConstructor;
|
|
535
|
-
};
|
|
536
|
-
horizontalLinesNumber: {
|
|
537
|
-
default: number;
|
|
538
|
-
type: NumberConstructor;
|
|
539
|
-
};
|
|
540
|
-
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
541
|
-
[key: string]: any;
|
|
542
|
-
}> | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
543
|
-
boundary: {
|
|
544
|
-
required: boolean;
|
|
545
|
-
type: import('vue').PropType<import('./props').Boundary>;
|
|
546
|
-
default: () => void;
|
|
547
|
-
};
|
|
548
|
-
verticalLines: {
|
|
549
|
-
default: boolean;
|
|
550
|
-
type: BooleanConstructor;
|
|
551
|
-
};
|
|
552
|
-
verticalLinesNumber: {
|
|
553
|
-
default: number;
|
|
554
|
-
type: NumberConstructor;
|
|
555
|
-
};
|
|
556
|
-
horizontalLines: {
|
|
557
|
-
default: boolean;
|
|
558
|
-
type: BooleanConstructor;
|
|
559
|
-
};
|
|
560
|
-
horizontalLinesNumber: {
|
|
561
|
-
default: number;
|
|
562
|
-
type: NumberConstructor;
|
|
563
|
-
};
|
|
564
|
-
}>> & Readonly<{}>, {
|
|
565
|
-
boundary: import('./props').Boundary;
|
|
566
|
-
verticalLines: boolean;
|
|
567
|
-
verticalLinesNumber: number;
|
|
568
|
-
horizontalLines: boolean;
|
|
569
|
-
horizontalLinesNumber: number;
|
|
570
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
571
|
-
TrendChartLabels: import('vue').DefineComponent<{
|
|
572
|
-
boundary: import('./props').Boundary;
|
|
573
|
-
yLabelsTextFormatter: Function;
|
|
574
|
-
color?: import('../../_props/css').CSSColor | undefined;
|
|
575
|
-
fontSize?: number | undefined;
|
|
576
|
-
minValue?: number | undefined;
|
|
577
|
-
maxValue?: number | undefined;
|
|
578
|
-
xLabels?: unknown[] | undefined;
|
|
579
|
-
yLabels?: number | undefined;
|
|
580
|
-
}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
581
|
-
[key: string]: any;
|
|
582
|
-
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
583
|
-
boundary: import('./props').Boundary;
|
|
584
|
-
yLabelsTextFormatter: Function;
|
|
585
|
-
color?: import('../../_props/css').CSSColor | undefined;
|
|
586
|
-
fontSize?: number | undefined;
|
|
587
|
-
minValue?: number | undefined;
|
|
588
|
-
maxValue?: number | undefined;
|
|
589
|
-
xLabels?: unknown[] | undefined;
|
|
590
|
-
yLabels?: number | undefined;
|
|
591
|
-
}> & Readonly<{}>, {
|
|
592
|
-
boundary: import('./props').Boundary;
|
|
593
|
-
yLabelsTextFormatter: Function;
|
|
594
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
595
441
|
TrendChartCurve: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
596
442
|
boundary: {
|
|
597
443
|
required: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
2
|
import { CSSColor } from '../../_props/css';
|
|
3
3
|
export type TrendChartStatus = 'primary' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
|
|
4
4
|
export type Padding = {
|
|
@@ -24,19 +24,6 @@ export type Boundary = {
|
|
|
24
24
|
};
|
|
25
25
|
export type DataSetTheme = {};
|
|
26
26
|
export type DataSet = number[];
|
|
27
|
-
export type Grid = {
|
|
28
|
-
verticalLines?: boolean;
|
|
29
|
-
verticalLinesNumber?: number;
|
|
30
|
-
horizontalLines?: boolean;
|
|
31
|
-
horizontalLinesNumber?: number;
|
|
32
|
-
};
|
|
33
|
-
export type Labels = {
|
|
34
|
-
xLabels: string[];
|
|
35
|
-
yLabels: number;
|
|
36
|
-
yLabelsTextFormatter: (value: number) => string;
|
|
37
|
-
fontSize?: number;
|
|
38
|
-
color?: CSSColor;
|
|
39
|
-
};
|
|
40
27
|
/** 数据点显示策略:true 常显,false 不显示,auto 时数据点少时常显、超过两个时仅高亮当前点 */
|
|
41
28
|
export type ShowPoints = boolean | 'auto';
|
|
42
29
|
/** 填充类型:gradient 由描边色向透明渐变,solid 为统一透明度纯色 */
|
|
@@ -84,14 +71,6 @@ export declare const trendChartProps: {
|
|
|
84
71
|
type: PropType<number | string>;
|
|
85
72
|
default: string;
|
|
86
73
|
};
|
|
87
|
-
grid: {
|
|
88
|
-
default: null;
|
|
89
|
-
type: PropType<Grid>;
|
|
90
|
-
};
|
|
91
|
-
labels: {
|
|
92
|
-
default: null;
|
|
93
|
-
type: PropType<Labels>;
|
|
94
|
-
};
|
|
95
74
|
max: {
|
|
96
75
|
type: NumberConstructor;
|
|
97
76
|
};
|
|
@@ -135,6 +114,14 @@ export declare const trendChartProps: {
|
|
|
135
114
|
ariaLabel: {
|
|
136
115
|
type: StringConstructor;
|
|
137
116
|
};
|
|
117
|
+
grid: {
|
|
118
|
+
default: null;
|
|
119
|
+
type: PropType<Record<string, unknown> | null>;
|
|
120
|
+
};
|
|
121
|
+
labels: {
|
|
122
|
+
default: null;
|
|
123
|
+
type: PropType<Record<string, unknown> | null>;
|
|
124
|
+
};
|
|
138
125
|
theme: {
|
|
139
126
|
type: PropType<Theme>;
|
|
140
127
|
default: () => {};
|
|
@@ -203,59 +190,3 @@ export declare const trendChartCurveProps: {
|
|
|
203
190
|
type: PropType<CurveTheme>;
|
|
204
191
|
};
|
|
205
192
|
};
|
|
206
|
-
export declare const trendChartGridProps: {
|
|
207
|
-
boundary: {
|
|
208
|
-
required: boolean;
|
|
209
|
-
type: PropType<Boundary>;
|
|
210
|
-
default: () => void;
|
|
211
|
-
};
|
|
212
|
-
verticalLines: {
|
|
213
|
-
default: boolean;
|
|
214
|
-
type: BooleanConstructor;
|
|
215
|
-
};
|
|
216
|
-
verticalLinesNumber: {
|
|
217
|
-
default: number;
|
|
218
|
-
type: NumberConstructor;
|
|
219
|
-
};
|
|
220
|
-
horizontalLines: {
|
|
221
|
-
default: boolean;
|
|
222
|
-
type: BooleanConstructor;
|
|
223
|
-
};
|
|
224
|
-
horizontalLinesNumber: {
|
|
225
|
-
default: number;
|
|
226
|
-
type: NumberConstructor;
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
export declare const trendChartLabelsProps: {
|
|
230
|
-
boundary: {
|
|
231
|
-
required: boolean;
|
|
232
|
-
type: PropType<Boundary>;
|
|
233
|
-
default: () => void;
|
|
234
|
-
};
|
|
235
|
-
minValue: {
|
|
236
|
-
type: NumberConstructor;
|
|
237
|
-
required: boolean;
|
|
238
|
-
};
|
|
239
|
-
maxValue: {
|
|
240
|
-
type: NumberConstructor;
|
|
241
|
-
required: boolean;
|
|
242
|
-
};
|
|
243
|
-
xLabels: {
|
|
244
|
-
type: ArrayConstructor;
|
|
245
|
-
};
|
|
246
|
-
yLabels: {
|
|
247
|
-
type: NumberConstructor;
|
|
248
|
-
required: boolean;
|
|
249
|
-
};
|
|
250
|
-
yLabelsTextFormatter: {
|
|
251
|
-
default: (value: any) => any;
|
|
252
|
-
type: FunctionConstructor;
|
|
253
|
-
};
|
|
254
|
-
fontSize: {
|
|
255
|
-
type: NumberConstructor;
|
|
256
|
-
};
|
|
257
|
-
color: {
|
|
258
|
-
type: PropType<CSSColor>;
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
export type TrendChartLabelsProps = ExtractPropTypes<typeof trendChartLabelsProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { reactive as a, onMounted as l, nextTick as d, onUnmounted as v, watch as h } from "vue";
|
|
2
|
+
const z = ({
|
|
3
|
+
elementRef: t,
|
|
4
|
+
width: i,
|
|
5
|
+
height: o
|
|
6
|
+
}) => {
|
|
7
|
+
const r = a({ width: 0, height: 0 }), e = () => {
|
|
8
|
+
const u = t.value;
|
|
9
|
+
if (!u) return;
|
|
10
|
+
const c = u.getBoundingClientRect();
|
|
11
|
+
r.width = Math.max(0, typeof i() == "number" ? i() : c.width), r.height = Math.max(0, typeof o() == "number" ? o() : c.height);
|
|
12
|
+
};
|
|
13
|
+
let n = null;
|
|
14
|
+
const s = () => e();
|
|
15
|
+
return l(() => {
|
|
16
|
+
e(), d(e), typeof ResizeObserver < "u" && t.value && (n = new ResizeObserver(() => e()), n.observe(t.value)), window.addEventListener("resize", s);
|
|
17
|
+
}), v(() => {
|
|
18
|
+
n == null || n.disconnect(), n = null, window.removeEventListener("resize", s);
|
|
19
|
+
}), h([i, o], () => {
|
|
20
|
+
d(e);
|
|
21
|
+
}), { size: r, setSize: e };
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
z as useChartSize
|
|
25
|
+
};
|
|
@@ -8,6 +8,7 @@ const r = {
|
|
|
8
8
|
"--x-button-color-bg-primary-subtle-hover": "var(--x-color-primary-subtle-hover)",
|
|
9
9
|
"--x-button-color-border-primary": "var(--x-color-primary-solid)",
|
|
10
10
|
"--x-button-color-text-primary": "var(--x-color-primary-button-text)",
|
|
11
|
+
"--x-chart-color-series-1": "var(--x-color-primary-solid)",
|
|
11
12
|
"--x-checkbox-mask-color-bg_checked": "var(--x-color-primary-6)",
|
|
12
13
|
"--x-checkbox-mask-color-bg_checked_disabled": "var(--x-color-primary-light-3)",
|
|
13
14
|
"--x-color-border-focus": "var(--x-color-primary-6)",
|
|
@@ -114,6 +115,7 @@ const r = {
|
|
|
114
115
|
"--x-button-color-bg-success-subtle-hover": "var(--x-color-success-subtle-hover)",
|
|
115
116
|
"--x-button-color-border-success": "var(--x-color-success-solid)",
|
|
116
117
|
"--x-button-color-text-success": "var(--x-color-success-button-text)",
|
|
118
|
+
"--x-chart-color-series-2": "var(--x-color-success-solid)",
|
|
117
119
|
"--x-color-success-button-text": "var(--x-color-success-text)",
|
|
118
120
|
"--x-color-success-light-1": "var(--x-color-success-1)",
|
|
119
121
|
"--x-color-success-solid": "var(--x-color-success-6)",
|
|
@@ -146,6 +148,7 @@ const r = {
|
|
|
146
148
|
"--x-button-color-bg-danger-subtle-hover": "var(--x-color-danger-subtle-hover)",
|
|
147
149
|
"--x-button-color-border-danger": "var(--x-color-danger-solid)",
|
|
148
150
|
"--x-button-color-text-danger": "var(--x-color-danger-button-text)",
|
|
151
|
+
"--x-chart-color-series-4": "var(--x-color-danger-solid)",
|
|
149
152
|
"--x-color-danger-button-text": "var(--x-color-danger-text)",
|
|
150
153
|
"--x-color-danger-light-1": "var(--x-color-danger-1)",
|
|
151
154
|
"--x-color-danger-light-2": "var(--x-color-danger-2)",
|
|
@@ -196,6 +199,7 @@ const r = {
|
|
|
196
199
|
"--x-button-color-bg-strong-subtle-hover": "var(--x-color-strong-subtle-hover)",
|
|
197
200
|
"--x-button-color-border-strong": "var(--x-color-strong-solid)",
|
|
198
201
|
"--x-button-color-text-strong": "var(--x-color-strong-button-text)",
|
|
202
|
+
"--x-chart-color-series-3": "var(--x-color-strong-solid)",
|
|
199
203
|
"--x-color-strong-button-text": "var(--x-color-strong-text)",
|
|
200
204
|
"--x-color-strong-solid": "var(--x-color-strong-6)",
|
|
201
205
|
"--x-color-strong-solid-active": "color-mix(in srgb, var(--x-color-strong-solid) 90%, var(--x-color-constant-dark))",
|
|
@@ -220,6 +224,7 @@ const r = {
|
|
|
220
224
|
"--x-button-color-bg-warning-subtle-hover": "var(--x-color-warning-subtle-hover)",
|
|
221
225
|
"--x-button-color-border-warning": "var(--x-color-warning-solid)",
|
|
222
226
|
"--x-button-color-text-warning": "var(--x-color-warning-button-text)",
|
|
227
|
+
"--x-chart-color-series-5": "var(--x-color-warning-solid)",
|
|
223
228
|
"--x-color-warning-button-text": "var(--x-color-warning-text)",
|
|
224
229
|
"--x-color-warning-light-1": "var(--x-color-warning-1)",
|
|
225
230
|
"--x-color-warning-solid": "var(--x-color-warning-6)",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const o = (e) => {
|
|
2
|
+
const t = (typeof e == "number" ? `${e}` : e).split(" ").filter((r) => r !== "").map((r) => Number(r));
|
|
3
|
+
switch (t.length) {
|
|
4
|
+
case 4:
|
|
5
|
+
return { top: t[0], right: t[1], bottom: t[2], left: t[3] };
|
|
6
|
+
case 3:
|
|
7
|
+
return { top: t[0], right: t[1], bottom: t[2], left: t[1] };
|
|
8
|
+
case 2:
|
|
9
|
+
return { top: t[0], right: t[1], bottom: t[0], left: t[1] };
|
|
10
|
+
default:
|
|
11
|
+
return { top: t[0], right: t[0], bottom: t[0], left: t[0] };
|
|
12
|
+
}
|
|
13
|
+
}, n = (e) => {
|
|
14
|
+
if (typeof e == "number")
|
|
15
|
+
return Number.isFinite(e) && e >= 0;
|
|
16
|
+
const t = e.split(" ").filter((r) => r !== "");
|
|
17
|
+
return t.length < 1 || t.length > 4 ? !1 : t.every((r) => /^\d+(\.\d+)?$/.test(r));
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
o as getPadding,
|
|
21
|
+
n as validatePadding
|
|
22
|
+
};
|