@rfkit/charts 1.0.86 → 1.0.88
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/index.d.ts +3 -2
- package/index.js +7 -7
- package/package.json +1 -1
- package/types/store.d.ts +1 -1
- package/utils/index.d.ts +13 -0
- package/modules/Spectrum/render copy.d.ts +0 -45
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Spectrum, LevelStream, IQ, Gauge, Dial, Heatmap, Occupancy, } from './lib';
|
|
2
2
|
export type { RecursiveObject, // 递归对象 后期会删除
|
|
3
3
|
RecursiveFunction, // 递归方法 后期会删除
|
|
4
|
-
AxisYRange, AxisXProps, SeriesConfig, SegmentsOriginal, SpectrumBandwidth, MarkerType,
|
|
5
|
-
export {
|
|
4
|
+
AxisYRange, AxisXProps, SeriesConfig, SegmentsOriginal, SpectrumBandwidth, MarkerType, SetSeries, SetSpectrumBandwidth, SetSegments, SetAntennaFactor, SetChannels, SetMarker, SpectrumExtraData, PublishSpectrum, PublishHeatmap, PublishOccupancy, PublishLevelStream, PublishIQ, PublishDial, PublishGauge, Reset, Render, PublishData, } from './types';
|
|
5
|
+
export { HeatmapCaptureType } from './types';
|
|
6
|
+
export { PSType, ChartType, SegmentsEvent, MarkerEventType, SeriesType, OptionKey, } from './config';
|
package/index.js
CHANGED
|
@@ -5079,14 +5079,14 @@ FullTicks_styles_module_options.insertStyleElement = insertStyleElement_default(
|
|
|
5079
5079
|
injectStylesIntoStyleTag_default()(FullTicks_styles_module.Z, FullTicks_styles_module_options);
|
|
5080
5080
|
const components_FullTicks_styles_module = FullTicks_styles_module.Z && FullTicks_styles_module.Z.locals ? FullTicks_styles_module.Z.locals : void 0;
|
|
5081
5081
|
const FullTicks_COMPONENT_KEY = 'AxisYHeatmapTicks';
|
|
5082
|
-
const
|
|
5082
|
+
const HEATMAP_FULL_TICKS = 10;
|
|
5083
5083
|
const FullTicks_Ticks = (props)=>{
|
|
5084
5084
|
const { id } = props;
|
|
5085
5085
|
const { state: { globalID } } = useStore_useStore();
|
|
5086
|
-
const [timeValues, setTimeValues] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(Array(
|
|
5086
|
+
const [timeValues, setTimeValues] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(Array(HEATMAP_FULL_TICKS).fill(''));
|
|
5087
5087
|
const positions = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
5088
5088
|
const pos = [];
|
|
5089
|
-
for(let i = 0; i <
|
|
5089
|
+
for(let i = 0; i < HEATMAP_FULL_TICKS; i++)pos.push(`${100 - i / (HEATMAP_FULL_TICKS - 1) * 100}%`);
|
|
5090
5090
|
return pos;
|
|
5091
5091
|
}, []);
|
|
5092
5092
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
@@ -5094,8 +5094,8 @@ const FullTicks_Ticks = (props)=>{
|
|
|
5094
5094
|
const { waterfallData } = withDatabase(globalID).getAllRawData();
|
|
5095
5095
|
const values = [];
|
|
5096
5096
|
const dataLength = waterfallData.length;
|
|
5097
|
-
for(let i = 0; i <
|
|
5098
|
-
const index = Math.floor((dataLength - 1) * i / (
|
|
5097
|
+
for(let i = 0; i < HEATMAP_FULL_TICKS; i++){
|
|
5098
|
+
const index = Math.floor((dataLength - 1) * i / (HEATMAP_FULL_TICKS - 1));
|
|
5099
5099
|
const data = waterfallData[index];
|
|
5100
5100
|
const value = data?.timestamp ? getDateTime(data.timestamp, void 0, void 0, true) : '';
|
|
5101
5101
|
values.push(value);
|
|
@@ -13147,7 +13147,7 @@ function useSeries() {
|
|
|
13147
13147
|
...SERIES_DEFAULT_CONFIG,
|
|
13148
13148
|
...existingSeries,
|
|
13149
13149
|
...config,
|
|
13150
|
-
label: label ||
|
|
13150
|
+
label: label || existingSeries?.label || name || existingSeries?.name,
|
|
13151
13151
|
data: data || existingSeries?.data
|
|
13152
13152
|
};
|
|
13153
13153
|
if (!constants_SERIES_NAMES.includes(name) && !seriesStore.data.has(name) && void 0 === config.display) newConfig.display = true;
|
|
@@ -14259,4 +14259,4 @@ const lib_Dial_Dial = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react
|
|
|
14259
14259
|
})
|
|
14260
14260
|
});
|
|
14261
14261
|
const lib_Dial = lib_Dial_Dial;
|
|
14262
|
-
export { constants_ChartType as ChartType, lib_Dial as Dial, lib_Gauge as Gauge, lib_Heatmap as Heatmap, lib_IQ as IQ, lib_LevelStream as LevelStream, constants_MarkerEventType as MarkerEventType, lib_Occupancy as Occupancy, constants_PSType as PSType, constants_SegmentsEvent as SegmentsEvent, constants_SeriesType as SeriesType, lib_Spectrum as Spectrum };
|
|
14262
|
+
export { constants_ChartType as ChartType, lib_Dial as Dial, lib_Gauge as Gauge, lib_Heatmap as Heatmap, store_HeatmapCaptureType as HeatmapCaptureType, lib_IQ as IQ, lib_LevelStream as LevelStream, constants_MarkerEventType as MarkerEventType, lib_Occupancy as Occupancy, constants_OptionKey as OptionKey, constants_PSType as PSType, constants_SegmentsEvent as SegmentsEvent, constants_SeriesType as SeriesType, lib_Spectrum as Spectrum };
|
package/package.json
CHANGED
package/types/store.d.ts
CHANGED
package/utils/index.d.ts
CHANGED
|
@@ -91,3 +91,16 @@ export declare const createChartRenderID: ({ moduleType, globalID, }: {
|
|
|
91
91
|
* @returns 转换后的TimestampedFloat32Array数组
|
|
92
92
|
*/
|
|
93
93
|
export declare const convertToTimestampedArrays: (data: number[][], timestamps?: Array<number>) => TimestampedFloat32Array[];
|
|
94
|
+
/**
|
|
95
|
+
* 防抖函数
|
|
96
|
+
* @param fn 需要防抖的函数
|
|
97
|
+
* @param delay 延迟时间(毫秒)
|
|
98
|
+
* @returns 带有cancel方法的防抖函数
|
|
99
|
+
*/
|
|
100
|
+
export declare const debounce: <T extends (...args: unknown[]) => unknown>(fn: T, delay?: number) => ((...args: Parameters<T>) => void) & {
|
|
101
|
+
cancel: () => void;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* 基于 requestAnimationFrame 的节流函数,适合视觉更新相关操作
|
|
105
|
+
*/
|
|
106
|
+
export declare function debounceRequestAnimationFrame<T extends unknown[]>(func?: (...args: T) => void): (...args: T) => void;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { SeriesConfig } from '../../types';
|
|
2
|
-
export declare const passThroughSeries: (globalID: string, series?: any) => any;
|
|
3
|
-
export default class Spectrum {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
constructor(props: any);
|
|
6
|
-
init(): void;
|
|
7
|
-
/**
|
|
8
|
-
* 更新数据
|
|
9
|
-
* TODO:可以自定义线
|
|
10
|
-
*/
|
|
11
|
-
updateSeries(d: {
|
|
12
|
-
[x: string]: any;
|
|
13
|
-
[x: number]: any;
|
|
14
|
-
}, extraData?: Map<string, {
|
|
15
|
-
outputData: Float32Array;
|
|
16
|
-
originalData: Float32Array;
|
|
17
|
-
}>): void;
|
|
18
|
-
updateMainSeries(data: {
|
|
19
|
-
length: any;
|
|
20
|
-
at: (arg0: number) => undefined;
|
|
21
|
-
}): void;
|
|
22
|
-
/**
|
|
23
|
-
* 更新参数
|
|
24
|
-
*/
|
|
25
|
-
updateParams(params: any): void;
|
|
26
|
-
/**
|
|
27
|
-
* 设置线信息
|
|
28
|
-
*/
|
|
29
|
-
setSeries(config: SeriesConfig): void;
|
|
30
|
-
setDisabledClearRect(disabledClearRect: boolean): void;
|
|
31
|
-
setRange(renderRange?: any): void;
|
|
32
|
-
zoom(): void;
|
|
33
|
-
reset(): void;
|
|
34
|
-
resize(): void;
|
|
35
|
-
clear(): void;
|
|
36
|
-
/**
|
|
37
|
-
* 切换渲染引擎
|
|
38
|
-
* @param useWebGL 是否使用 WebGL,如果不指定则自动检测
|
|
39
|
-
*/
|
|
40
|
-
switchRenderEngine(useWebGL?: boolean): void;
|
|
41
|
-
/**
|
|
42
|
-
* 获取当前使用的渲染引擎类型
|
|
43
|
-
*/
|
|
44
|
-
getRenderEngineType(): 'webgl' | 'canvas2d';
|
|
45
|
-
}
|