@tsingroc/tsingroc-components 5.0.0-alpha.10 → 5.0.0-alpha.12
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/components/Auth.d.ts +310 -0
- package/dist/components/Auth.js +267 -0
- package/dist/components/AutoResizedECharts.d.ts +21 -0
- package/dist/components/AutoResizedECharts.js +98 -0
- package/dist/components/Calendar.d.ts +50 -0
- package/dist/components/Calendar.js +130 -0
- package/dist/components/CircularProgress.d.ts +21 -0
- package/dist/components/CircularProgress.js +34 -0
- package/dist/components/ConnectedECharts.d.ts +31 -0
- package/dist/components/ConnectedECharts.js +100 -0
- package/dist/components/ECharts.d.ts +57 -0
- package/dist/components/ECharts.js +255 -0
- package/dist/components/Header.d.ts +67 -0
- package/dist/components/Header.js +171 -0
- package/dist/components/ImageBackground.d.ts +32 -0
- package/dist/components/ImageBackground.js +76 -0
- package/dist/components/IndicatorLight.d.ts +44 -0
- package/dist/components/IndicatorLight.js +124 -0
- package/dist/components/LeftAlignedECharts.d.ts +42 -0
- package/dist/components/LeftAlignedECharts.js +270 -0
- package/dist/components/LineChartEditor.d.ts +74 -0
- package/dist/components/LineChartEditor.js +458 -0
- package/dist/components/LineChartTable.d.ts +38 -0
- package/dist/components/LineChartTable.js +245 -0
- package/dist/components/LinkedLineChart.d.ts +45 -0
- package/dist/components/LinkedLineChart.js +159 -0
- package/dist/components/QuickDateRangePicker.d.ts +30 -0
- package/dist/components/QuickDateRangePicker.js +58 -0
- package/dist/components/SegmentedButtons.d.ts +22 -0
- package/dist/components/SegmentedButtons.js +86 -0
- package/dist/components/Sidebar.d.ts +79 -0
- package/dist/components/Sidebar.js +178 -0
- package/dist/components/TsingrocDatePicker.d.ts +38 -0
- package/dist/components/TsingrocDatePicker.js +64 -0
- package/dist/components/TsingrocTheme.d.ts +15 -0
- package/dist/components/TsingrocTheme.js +72 -0
- package/dist/components/UserButton.d.ts +42 -0
- package/dist/components/UserButton.js +105 -0
- package/dist/components/VerticalColorLegend.d.ts +7 -0
- package/dist/components/VerticalColorLegend.js +208 -0
- package/dist/components/WeatherMap.d.ts +18 -0
- package/dist/components/WeatherMap.js +658 -0
- package/dist/deckgl/TiandituLayer.d.ts +13 -0
- package/dist/deckgl/TiandituLayer.js +44 -0
- package/dist/deckgl/WeatherData.d.ts +53 -0
- package/dist/deckgl/WeatherData.js +94 -0
- package/dist/deckgl/index.d.ts +1 -0
- package/dist/deckgl/index.js +1 -0
- package/dist/echarts/coordinateSystems/grid.d.ts +43 -0
- package/dist/echarts/coordinateSystems/grid.js +107 -0
- package/dist/echarts/coordinateSystems/index.js +2 -0
- package/dist/echarts/coordinateSystems/polar.d.ts +45 -0
- package/dist/echarts/coordinateSystems/polar.js +96 -0
- package/dist/echarts/gl-types.d.js +0 -0
- package/dist/echarts/gl.d.ts +115 -0
- package/dist/echarts/gl.js +47 -0
- package/dist/echarts/index.d.ts +46 -0
- package/dist/echarts/index.js +46 -0
- package/dist/echarts/legend.d.ts +17 -0
- package/dist/echarts/legend.js +15 -0
- package/dist/echarts/radar.d.ts +24 -0
- package/dist/echarts/radar.js +22 -0
- package/dist/echarts/series/barSeries.d.ts +23 -0
- package/dist/echarts/series/barSeries.js +18 -0
- package/dist/echarts/series/boxplotSeries.d.ts +21 -0
- package/dist/echarts/series/boxplotSeries.js +40 -0
- package/dist/echarts/series/index.js +7 -0
- package/dist/echarts/series/intervalSeries.d.ts +32 -0
- package/dist/echarts/series/intervalSeries.js +55 -0
- package/dist/echarts/series/lineSeries.d.ts +36 -0
- package/dist/echarts/series/lineSeries.js +45 -0
- package/dist/echarts/series/maxBarSeries.d.ts +18 -0
- package/dist/echarts/series/maxBarSeries.js +39 -0
- package/dist/echarts/series/pieSeries.d.ts +31 -0
- package/dist/echarts/series/pieSeries.js +47 -0
- package/dist/echarts/series/windLineSeries.d.ts +47 -0
- package/dist/echarts/series/windLineSeries.js +51 -0
- package/{src/echarts/tooltip.ts → dist/echarts/tooltip.d.ts} +1 -5
- package/dist/echarts/tooltip.js +18 -0
- package/dist/env.d.js +0 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +20 -0
- package/dist/utils/debug.d.ts +1 -0
- package/dist/utils/debug.js +25 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/math.d.ts +9 -0
- package/{src/utils/math.ts → dist/utils/math.js} +2 -2
- package/dist/utils/mock.d.ts +8 -0
- package/dist/utils/mock.js +40 -0
- package/dist/utils/startOfQuarter.d.ts +2 -0
- package/dist/utils/startOfQuarter.js +4 -0
- package/package.json +26 -14
- package/src/components/Auth.tsx +0 -623
- package/src/components/AutoResizedECharts.tsx +0 -70
- package/src/components/Calendar.tsx +0 -182
- package/src/components/CircularProgress.tsx +0 -38
- package/src/components/ConnectedECharts.tsx +0 -62
- package/src/components/ECharts.tsx +0 -206
- package/src/components/Header.tsx +0 -136
- package/src/components/ImageBackground.tsx +0 -58
- package/src/components/IndicatorLight.tsx +0 -106
- package/src/components/LeftAlignedECharts.tsx +0 -190
- package/src/components/LineChartEditor.tsx +0 -558
- package/src/components/LineChartTable.tsx +0 -286
- package/src/components/LinkedECharts.tsx +0 -51
- package/src/components/LinkedLineChart.tsx +0 -144
- package/src/components/QuickDateRangePicker.tsx +0 -84
- package/src/components/SegmentedButtons.tsx +0 -46
- package/src/components/Sidebar.tsx +0 -271
- package/src/components/StrictECharts.d.ts +0 -47
- package/src/components/StrictECharts.js +0 -1
- package/src/components/TsingrocDatePicker.tsx +0 -103
- package/src/components/TsingrocTheme.tsx +0 -48
- package/src/components/UserButton.tsx +0 -165
- package/src/components/VerticalColorLegend.tsx +0 -73
- package/src/components/WeatherMap.tsx +0 -522
- package/src/deckgl/TiandituLayer.ts +0 -56
- package/src/deckgl/WeatherData.ts +0 -157
- package/src/deckgl/index.ts +0 -4
- package/src/echarts/coordinateSystems/grid.ts +0 -143
- package/src/echarts/coordinateSystems/polar.ts +0 -148
- package/src/echarts/gl.ts +0 -159
- package/src/echarts/index.ts +0 -129
- package/src/echarts/legend.ts +0 -36
- package/src/echarts/radar.ts +0 -46
- package/src/echarts/series/barSeries.ts +0 -37
- package/src/echarts/series/boxplotSeries.ts +0 -62
- package/src/echarts/series/intervalSeries.ts +0 -70
- package/src/echarts/series/lineSeries.ts +0 -78
- package/src/echarts/series/maxBarSeries.ts +0 -55
- package/src/echarts/series/pieSeries.ts +0 -76
- package/src/echarts/series/windLineSeries.ts +0 -113
- package/src/index.ts +0 -118
- package/src/types.d.ts +0 -5
- package/src/utils/debug.ts +0 -39
- package/src/utils/mock.ts +0 -69
- package/src/utils/startOfQuarter.ts +0 -6
- /package/{src/echarts/coordinateSystems/index.ts → dist/echarts/coordinateSystems/index.d.ts} +0 -0
- /package/{src/echarts/series/index.ts → dist/echarts/series/index.d.ts} +0 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, use, useEffect, useEffectEvent, useId, useImperativeHandle, useRef, useState } from "react";
|
|
3
|
+
import { debugAssert } from "../utils/debug";
|
|
4
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
+
import ConnectedECharts from "./ConnectedECharts"; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const LeftAlignContext = /*#__PURE__*/createContext(null);
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 为 {@linkcode LeftAlignedECharts} 和
|
|
11
|
+
* {@linkcode withLeftAlign | withLeftAlign(ECharts)}
|
|
12
|
+
* 提供对齐上下文。
|
|
13
|
+
*/
|
|
14
|
+
export function EChartsLeftAligner(t0) {
|
|
15
|
+
const $ = _c(10);
|
|
16
|
+
const {
|
|
17
|
+
children
|
|
18
|
+
} = t0;
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
21
|
+
t1 = new Map();
|
|
22
|
+
$[0] = t1;
|
|
23
|
+
} else {
|
|
24
|
+
t1 = $[0];
|
|
25
|
+
}
|
|
26
|
+
const [labelsWidthMap, setLabelsWidthMap] = useState(t1);
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[1] !== labelsWidthMap) {
|
|
29
|
+
t2 = Math.max(...labelsWidthMap.values());
|
|
30
|
+
$[1] = labelsWidthMap;
|
|
31
|
+
$[2] = t2;
|
|
32
|
+
} else {
|
|
33
|
+
t2 = $[2];
|
|
34
|
+
}
|
|
35
|
+
let t3;
|
|
36
|
+
let t4;
|
|
37
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
38
|
+
t3 = (id, size) => setLabelsWidthMap(map => new Map(map).set(id, size));
|
|
39
|
+
t4 = id_0 => setLabelsWidthMap(map_0 => (map_0 = new Map(map_0), map_0.delete(id_0), map_0));
|
|
40
|
+
$[3] = t3;
|
|
41
|
+
$[4] = t4;
|
|
42
|
+
} else {
|
|
43
|
+
t3 = $[3];
|
|
44
|
+
t4 = $[4];
|
|
45
|
+
}
|
|
46
|
+
let t5;
|
|
47
|
+
if ($[5] !== t2) {
|
|
48
|
+
t5 = {
|
|
49
|
+
maxLabelsWidth: t2,
|
|
50
|
+
register: t3,
|
|
51
|
+
unregister: t4
|
|
52
|
+
};
|
|
53
|
+
$[5] = t2;
|
|
54
|
+
$[6] = t5;
|
|
55
|
+
} else {
|
|
56
|
+
t5 = $[6];
|
|
57
|
+
}
|
|
58
|
+
let t6;
|
|
59
|
+
if ($[7] !== children || $[8] !== t5) {
|
|
60
|
+
t6 = /*#__PURE__*/_jsx(LeftAlignContext.Provider, {
|
|
61
|
+
value: t5,
|
|
62
|
+
children: children
|
|
63
|
+
});
|
|
64
|
+
$[7] = children;
|
|
65
|
+
$[8] = t5;
|
|
66
|
+
$[9] = t6;
|
|
67
|
+
} else {
|
|
68
|
+
t6 = $[9];
|
|
69
|
+
}
|
|
70
|
+
return t6;
|
|
71
|
+
}
|
|
72
|
+
function findLabelsGroup(element) {
|
|
73
|
+
if (element.isGroup) {
|
|
74
|
+
const group = element;
|
|
75
|
+
if (group.children().every(el => el.type === "text")) {
|
|
76
|
+
return group;
|
|
77
|
+
} else {
|
|
78
|
+
for (const child of group.children()) {
|
|
79
|
+
const found = findLabelsGroup(child);
|
|
80
|
+
if (found) {
|
|
81
|
+
return found;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function getLabelsWidth(instance) {
|
|
88
|
+
const yAxis = instance.getZr().storage.getRoots().find(it => it.__ecComponentInfo.mainType === "yAxis");
|
|
89
|
+
if (!yAxis) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
const labelsGroup = findLabelsGroup(yAxis);
|
|
93
|
+
if (!labelsGroup) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
// 不知道为什么,直接在 labelsGroup 上使用 getBoundingRect 测量到的宽度有时是错误的
|
|
97
|
+
const childrenWidths = labelsGroup.children().map(it => it.getBoundingRect().width);
|
|
98
|
+
return Math.max(...childrenWidths);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 为 ECharts 添加与其它 ECharts 纵轴左对齐的能力。
|
|
103
|
+
*
|
|
104
|
+
* 使用该组件时必须满足下列限制:
|
|
105
|
+
*
|
|
106
|
+
* - 必须包裹在 {@linkcode EChartsLeftAligner} 内,否则会立即抛出错误。
|
|
107
|
+
* - 图像所在的容器本身必须已经左对齐。
|
|
108
|
+
* - 图像中必须包含且仅包含一个 grid 坐标系。
|
|
109
|
+
* 如果图像不包含 grid,那么该组件不会产生任何效果。
|
|
110
|
+
* 如果图像包含多个 grid,那么该组件只会对齐其中一个 grid,且无法保证是哪一个。
|
|
111
|
+
* - grid 必须有且仅有一个纵轴,并且在左侧,不满足这一条件的影响同上一条。
|
|
112
|
+
* - grid 坐标系必须被设置为 `{ containLabel: true }` 或者
|
|
113
|
+
* `{ outerBoundsMode: "same", outerBoundsContain: "axisLabel" }`。
|
|
114
|
+
* 这也是组件库内的 `echarts.grid()` 的默认设置。
|
|
115
|
+
* 如果你不这么设置,而是使用 `left` 和 `bottom` 来手动对齐轴线,那就没必要使用这个组件,强行使用可能导致布局异常。
|
|
116
|
+
* - grid 坐标系的 `left` 属性会被该组件覆盖,最终效果总是会使得纵轴标签最宽的坐标系的标签紧贴容器左边缘(即 `left === 0`)。
|
|
117
|
+
* - 左对齐时原本的过渡动画会被打断。
|
|
118
|
+
*/
|
|
119
|
+
export const withLeftAlign = ECharts => props => {
|
|
120
|
+
"use memo";
|
|
121
|
+
|
|
122
|
+
const $ = _c(27);
|
|
123
|
+
let onSetOption;
|
|
124
|
+
let option;
|
|
125
|
+
let outerRef;
|
|
126
|
+
let rest;
|
|
127
|
+
if ($[0] !== props) {
|
|
128
|
+
({
|
|
129
|
+
ref: outerRef,
|
|
130
|
+
option,
|
|
131
|
+
onSetOption,
|
|
132
|
+
...rest
|
|
133
|
+
} = props);
|
|
134
|
+
$[0] = props;
|
|
135
|
+
$[1] = onSetOption;
|
|
136
|
+
$[2] = option;
|
|
137
|
+
$[3] = outerRef;
|
|
138
|
+
$[4] = rest;
|
|
139
|
+
} else {
|
|
140
|
+
onSetOption = $[1];
|
|
141
|
+
option = $[2];
|
|
142
|
+
outerRef = $[3];
|
|
143
|
+
rest = $[4];
|
|
144
|
+
}
|
|
145
|
+
const ref = useRef(null);
|
|
146
|
+
let t0;
|
|
147
|
+
let t1;
|
|
148
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
149
|
+
t0 = () => {
|
|
150
|
+
debugAssert(ref.current, "ref should be connected");
|
|
151
|
+
return ref.current;
|
|
152
|
+
};
|
|
153
|
+
t1 = [];
|
|
154
|
+
$[5] = t0;
|
|
155
|
+
$[6] = t1;
|
|
156
|
+
} else {
|
|
157
|
+
t0 = $[5];
|
|
158
|
+
t1 = $[6];
|
|
159
|
+
}
|
|
160
|
+
useImperativeHandle(outerRef, t0, t1);
|
|
161
|
+
const context = use(LeftAlignContext);
|
|
162
|
+
if (!context) {
|
|
163
|
+
throw new Error("LeftAlignedECharts or withLeftAlign(ECharts) must be wrapped inside an EChartsLeftAligner!");
|
|
164
|
+
}
|
|
165
|
+
const {
|
|
166
|
+
maxLabelsWidth,
|
|
167
|
+
register,
|
|
168
|
+
unregister
|
|
169
|
+
} = context;
|
|
170
|
+
const id = useId();
|
|
171
|
+
const [labelsWidth, setLabelsWidth] = useState();
|
|
172
|
+
let t2;
|
|
173
|
+
if ($[7] !== id || $[8] !== register) {
|
|
174
|
+
t2 = instance => {
|
|
175
|
+
const labelsWidth_0 = getLabelsWidth(instance);
|
|
176
|
+
if (labelsWidth_0 !== undefined) {
|
|
177
|
+
setLabelsWidth(labelsWidth_0);
|
|
178
|
+
register(id, labelsWidth_0);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
$[7] = id;
|
|
182
|
+
$[8] = register;
|
|
183
|
+
$[9] = t2;
|
|
184
|
+
} else {
|
|
185
|
+
t2 = $[9];
|
|
186
|
+
}
|
|
187
|
+
const reportLayoutChange = useEffectEvent(t2);
|
|
188
|
+
let t3;
|
|
189
|
+
if ($[10] !== id || $[11] !== unregister) {
|
|
190
|
+
t3 = () => unregister(id);
|
|
191
|
+
$[10] = id;
|
|
192
|
+
$[11] = unregister;
|
|
193
|
+
$[12] = t3;
|
|
194
|
+
} else {
|
|
195
|
+
t3 = $[12];
|
|
196
|
+
}
|
|
197
|
+
const dispose = useEffectEvent(t3);
|
|
198
|
+
let t4;
|
|
199
|
+
if ($[13] !== dispose) {
|
|
200
|
+
t4 = () => dispose;
|
|
201
|
+
$[13] = dispose;
|
|
202
|
+
$[14] = t4;
|
|
203
|
+
} else {
|
|
204
|
+
t4 = $[14];
|
|
205
|
+
}
|
|
206
|
+
let t5;
|
|
207
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
208
|
+
t5 = [];
|
|
209
|
+
$[15] = t5;
|
|
210
|
+
} else {
|
|
211
|
+
t5 = $[15];
|
|
212
|
+
}
|
|
213
|
+
useEffect(t4, t5);
|
|
214
|
+
let t6;
|
|
215
|
+
if ($[16] !== labelsWidth || $[17] !== maxLabelsWidth || $[18] !== option) {
|
|
216
|
+
t6 = option === undefined || option.grid === undefined || labelsWidth === undefined || Number.isNaN(labelsWidth) || labelsWidth >= maxLabelsWidth ? option : {
|
|
217
|
+
...option,
|
|
218
|
+
grid: (Array.isArray(option.grid) ? option.grid : [option.grid]).map(it => ({
|
|
219
|
+
...it,
|
|
220
|
+
left: maxLabelsWidth - labelsWidth
|
|
221
|
+
}))
|
|
222
|
+
};
|
|
223
|
+
$[16] = labelsWidth;
|
|
224
|
+
$[17] = maxLabelsWidth;
|
|
225
|
+
$[18] = option;
|
|
226
|
+
$[19] = t6;
|
|
227
|
+
} else {
|
|
228
|
+
t6 = $[19];
|
|
229
|
+
}
|
|
230
|
+
let t7;
|
|
231
|
+
if ($[20] !== onSetOption || $[21] !== reportLayoutChange) {
|
|
232
|
+
t7 = instance_0 => {
|
|
233
|
+
reportLayoutChange(instance_0);
|
|
234
|
+
return onSetOption?.(instance_0);
|
|
235
|
+
};
|
|
236
|
+
$[20] = onSetOption;
|
|
237
|
+
$[21] = reportLayoutChange;
|
|
238
|
+
$[22] = t7;
|
|
239
|
+
} else {
|
|
240
|
+
t7 = $[22];
|
|
241
|
+
}
|
|
242
|
+
let t8;
|
|
243
|
+
if ($[23] !== rest || $[24] !== t6 || $[25] !== t7) {
|
|
244
|
+
t8 = /*#__PURE__*/_jsx(ECharts, {
|
|
245
|
+
ref: ref,
|
|
246
|
+
option: t6,
|
|
247
|
+
onSetOption: t7,
|
|
248
|
+
...rest
|
|
249
|
+
});
|
|
250
|
+
$[23] = rest;
|
|
251
|
+
$[24] = t6;
|
|
252
|
+
$[25] = t7;
|
|
253
|
+
$[26] = t8;
|
|
254
|
+
} else {
|
|
255
|
+
t8 = $[26];
|
|
256
|
+
}
|
|
257
|
+
return t8;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* 预置了纵轴左对齐、联动和自适应容器尺寸能力的 ECharts 组件。
|
|
262
|
+
*
|
|
263
|
+
* @see {@linkcode withLeftAlign}
|
|
264
|
+
* @see {@linkcode withConnector}
|
|
265
|
+
* @see {@linkcode withAutoResize}
|
|
266
|
+
*/
|
|
267
|
+
const LeftAlignedECharts = Object.assign(withLeftAlign(ConnectedECharts), {
|
|
268
|
+
displayName: "LeftAlignedECharts"
|
|
269
|
+
});
|
|
270
|
+
export default LeftAlignedECharts;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type FlexProps } from "antd";
|
|
2
|
+
export interface LineChartEditorProps extends Omit<FlexProps, "children"> {
|
|
3
|
+
/** X 轴的数据。*/
|
|
4
|
+
xData: (string | number)[];
|
|
5
|
+
/** Y 轴的原始数据。*/
|
|
6
|
+
origData: number[];
|
|
7
|
+
/**
|
|
8
|
+
* X 轴的名称。
|
|
9
|
+
* @default "时间"
|
|
10
|
+
*/
|
|
11
|
+
xName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Y 轴的名称。
|
|
14
|
+
* @default "数值"
|
|
15
|
+
*/
|
|
16
|
+
yName?: string;
|
|
17
|
+
/** Y 轴的单位,默认不显示。*/
|
|
18
|
+
yUnit?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 原始曲线的名称。
|
|
21
|
+
* @default "原始曲线"
|
|
22
|
+
*/
|
|
23
|
+
origName?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 修改后曲线的名称。
|
|
26
|
+
* @default "修正曲线"
|
|
27
|
+
*/
|
|
28
|
+
newName?: string;
|
|
29
|
+
/** 原始曲线的颜色,默认使用 ECharts 的默认值。*/
|
|
30
|
+
origColor?: string;
|
|
31
|
+
/** 修改后曲线的颜色,默认使用 ECharts 的默认值。*/
|
|
32
|
+
newColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 是否平滑曲线显示。
|
|
35
|
+
*
|
|
36
|
+
* 如果是 `boolean` 类型,则表示是否开启平滑处理。如果是 `number` 类型(取值范围 0 到 1),
|
|
37
|
+
* 表示平滑程度,越小表示越接近折线段,反之亦然。设为 `true` 时相当于设为 0.5。
|
|
38
|
+
*
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
smooth?: boolean | number;
|
|
42
|
+
/**
|
|
43
|
+
* 折线图的高度。表格会自动占满剩余的高度。
|
|
44
|
+
* @default 175
|
|
45
|
+
*/
|
|
46
|
+
chartHeight?: string | number;
|
|
47
|
+
/**
|
|
48
|
+
* 控制按钮的位置。
|
|
49
|
+
* @default "bottom"
|
|
50
|
+
*/
|
|
51
|
+
controlsLocation?: "top" | "bottom";
|
|
52
|
+
/**
|
|
53
|
+
* 保存时是否弹窗要求确认。
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
confirmPopup?: boolean;
|
|
57
|
+
/** 确认提交修改时的回调。*/
|
|
58
|
+
onConfirm?: (newData: number[], xData: (string | number)[]) => void;
|
|
59
|
+
/**
|
|
60
|
+
* 上下调整数值的步长的默认值。用户总是可以在组件内自行调整步长。
|
|
61
|
+
* @default 0.1
|
|
62
|
+
*/
|
|
63
|
+
adjustStep?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 一个折线图编辑器,由折线图、数据表格和确认/撤销按钮三部分组成。
|
|
67
|
+
* 可以在曲线上使用键盘上下/WS 键,或者在表格中编辑数据。
|
|
68
|
+
*
|
|
69
|
+
* 除了文档列出的属性外,多余的属性会被传递给最外层的 [Flex][1] 组件。
|
|
70
|
+
*
|
|
71
|
+
* [1]: https://ant-design.antgroup.com/components/flex-cn#api
|
|
72
|
+
*/
|
|
73
|
+
declare function LineChartEditor(props: LineChartEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
export default LineChartEditor;
|