@rfkit/charts 1.18.4 → 1.18.5
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/README.md
CHANGED
|
@@ -94,6 +94,7 @@ export function GaugeDemo() {
|
|
|
94
94
|
- `SetSeries`
|
|
95
95
|
- `SetSegments`
|
|
96
96
|
- `SetMarker`
|
|
97
|
+
- `SetAntennaFactor`
|
|
97
98
|
|
|
98
99
|
## 电平流
|
|
99
100
|
|
|
@@ -179,6 +180,29 @@ dialRef.current?.({
|
|
|
179
180
|
|
|
180
181
|
`extraData` 默认保持完整数组设置语义;设置 `segmentedExtraData: true` 后,同一次推送中的每条额外频谱线会独立使用 `segmentOffset + offset` 拼接,并随主实时值同步缩放。
|
|
181
182
|
|
|
183
|
+
## 场强单位与天线因子
|
|
184
|
+
|
|
185
|
+
`Spectrum` 默认隐藏 `/m` 场强单位;推送非空 `Float32Array` 天线因子后开放 `/m` 单位切换,省略 `data` 或传入空 `Float32Array` 清空因子后会收回 `/m` 单位(若当前停留在 `/m`,自动退回对应的非场强单位)。
|
|
186
|
+
|
|
187
|
+
```tsx
|
|
188
|
+
import { PSType, Spectrum, type Publish } from '@rfkit/charts';
|
|
189
|
+
|
|
190
|
+
const chartRef = useRef<Publish>(null);
|
|
191
|
+
|
|
192
|
+
<Spectrum ref={chartRef} />;
|
|
193
|
+
|
|
194
|
+
// 全长/分段 Float32Array 或清空
|
|
195
|
+
chartRef.current?.({
|
|
196
|
+
pstype: PSType.AntennaFactor,
|
|
197
|
+
data: new Float32Array([12, 13, 14]),
|
|
198
|
+
segmentOffset: 0,
|
|
199
|
+
offset: 0
|
|
200
|
+
});
|
|
201
|
+
chartRef.current?.({ pstype: PSType.AntennaFactor });
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
多段扫描的 `SegmentsOriginal` 可选传入正整数 `pointCount` 显式指定分段点数。
|
|
205
|
+
|
|
182
206
|
## 频率轴标签
|
|
183
207
|
|
|
184
208
|
有单段频率规则的 `SingleFrequency`、`Lite` 和 `DDC` 可通过 `axisX.labelMode` 切换可见频段的标签:
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const nextItem: <T extends string | number>(v: T, list: T[]) => T;
|
|
2
2
|
export declare const resolveSpectrumUnitList: (unitList: string[] | undefined, fieldStrengthUnitAvailable: boolean) => string[];
|
|
3
|
+
export declare const resolveNonFieldStrengthUnit: (unit: string | undefined, unitList?: string[]) => string;
|
|
3
4
|
export declare function findNeighbors(currentValue: number, arr: number[], deltaY: number): number | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function useFieldStrengthUnitAvailability(): (available: boolean) => void;
|