@rfkit/charts 1.10.6 → 1.10.8
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 +13 -0
- package/index.d.ts +1 -1
- package/modules/base/CircularRenderer.d.ts +8 -0
- package/package.json +1 -1
- package/types/publish.d.ts +8 -1
package/README.md
CHANGED
|
@@ -94,6 +94,19 @@ export function GaugeDemo() {
|
|
|
94
94
|
- `SetSegments`
|
|
95
95
|
- `SetMarker`
|
|
96
96
|
|
|
97
|
+
`PublishDial` 支持推送 `series`、`range`、`yawAngle`、`isNorthFacing`,以及可选 `polygon: DialPolygon[]` 绘制雷达多边形:每个多边形提供 `values`(各方向归一化值 0-1,长度即方向数,按 0..360 度均匀分布)与可选 `color`(缺省走主题主色)。各方向值决定半径,连成闭合多边形,半透明填充 + 同色描边;`series` 已改为可选,纯雷达数据可以只传 `polygon`。
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
import { Dial, PSType, type Publish } from '@rfkit/charts';
|
|
101
|
+
|
|
102
|
+
const dialRef = useRef<Publish>(null);
|
|
103
|
+
|
|
104
|
+
dialRef.current?.({
|
|
105
|
+
pstype: PSType.Dial,
|
|
106
|
+
polygon: [{ values: [0.9, 0.6, 0.8, 0.45, 0.75, 0.5, 0.85, 0.7] }]
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
97
110
|
`PublishSpectrum` 支持推送内置频谱数据线,包括 `data`、`maxData`、`minData`、`avgData`、`thresholdData`、`templateData`、`backgroundNoiseData` 和 `extraData`。`thresholdData` 不传 `segmentOffset` / `offset` 时按整条门限替换;传入 `segmentOffset` 或 `offset` 时按局部门限写入。
|
|
98
111
|
|
|
99
112
|
`extraData` 默认保持完整数组设置语义;设置 `segmentedExtraData: true` 后,同一次推送中的每条额外频谱线会独立使用 `segmentOffset + offset` 拼接,并随主实时值同步缩放。
|
package/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { setFrequencyAllocationChannelsToCache, setFrequencyAllocationToCache }
|
|
|
6
6
|
export { type ChartsThemeChange, type InitChartsThemeOptions, type InitChartsThemeResult, initChartsTheme } from './theme/init-charts-theme';
|
|
7
7
|
export { type ChartsThemePreference, type ChartsThemeState, getChartsThemeState, subscribeChartsThemeChange } from './theme/theme-runtime';
|
|
8
8
|
export type { ChartsSizeTokensConfig, ChartsThemeTokensConfig } from './theme/theme-tokens';
|
|
9
|
-
export type { AxisXProps, AxisYRange, BandProps, ChartRef, FrequencyAllocationChannel, FrequencyAllocationDensity, FrequencyAllocationItem, MarkerProps, MarkerType, Publish, PublishData, PublishDial, PublishGauge, PublishHeatmap, PublishIQ, PublishLevelStream, PublishOccupancy, PublishSpectrum, RecursiveFunction, // 递归方法 后期会删除
|
|
9
|
+
export type { AxisXProps, AxisYRange, BandProps, ChartRef, DialPolygon, FrequencyAllocationChannel, FrequencyAllocationDensity, FrequencyAllocationItem, MarkerProps, MarkerType, Publish, PublishData, PublishDial, PublishGauge, PublishHeatmap, PublishIQ, PublishLevelStream, PublishOccupancy, PublishSpectrum, RecursiveFunction, // 递归方法 后期会删除
|
|
10
10
|
RecursiveObject, // 递归对象 后期会删除
|
|
11
11
|
Render, Reset, SegmentsOriginal, SeriesConfig, SetAntennaFactor, SetChannels, SetMarker, SetSegments, SetSeries, SetSpectrumBandwidth, SignalData, SignalDetails, SpectrumBandwidth, SpectrumExtraData, StationInfoType } from './types';
|
|
12
12
|
export { HeatmapCaptureType, MarkerMode } from './types';
|
|
@@ -13,12 +13,20 @@ export interface CircularSeriesItem {
|
|
|
13
13
|
lineWidth?: number;
|
|
14
14
|
radio?: number;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* 雷达多边形数据项
|
|
18
|
+
*/
|
|
19
|
+
export interface CircularPolygonItem {
|
|
20
|
+
values: number[];
|
|
21
|
+
color?: string;
|
|
22
|
+
}
|
|
16
23
|
/**
|
|
17
24
|
* 圆形图表数据
|
|
18
25
|
*/
|
|
19
26
|
export interface CircularData {
|
|
20
27
|
series?: CircularSeriesItem[];
|
|
21
28
|
range?: number[];
|
|
29
|
+
polygon?: CircularPolygonItem[];
|
|
22
30
|
yawAngle?: number;
|
|
23
31
|
isNorthFacing?: boolean;
|
|
24
32
|
}
|
package/package.json
CHANGED
package/types/publish.d.ts
CHANGED
|
@@ -90,13 +90,20 @@ export interface PublishIQ {
|
|
|
90
90
|
IData: number[];
|
|
91
91
|
QData: number[];
|
|
92
92
|
}
|
|
93
|
+
export interface DialPolygon {
|
|
94
|
+
/** 各方向归一化值(0-1),长度即方向数,按 0..360 度均匀分布;值决定该方向半径,1 贴最外网格 */
|
|
95
|
+
values: number[];
|
|
96
|
+
/** 多边形颜色;缺省走主题主色 fillStylePrimary,边框与半透明填充均由此色派生 */
|
|
97
|
+
color?: string;
|
|
98
|
+
}
|
|
93
99
|
export interface PublishDial {
|
|
94
100
|
pstype?: PSType.Dial;
|
|
95
|
-
series
|
|
101
|
+
series?: Array<{
|
|
96
102
|
value: number;
|
|
97
103
|
color: string;
|
|
98
104
|
}>;
|
|
99
105
|
range?: number[];
|
|
106
|
+
polygon?: DialPolygon[];
|
|
100
107
|
yawAngle?: number;
|
|
101
108
|
isNorthFacing?: boolean;
|
|
102
109
|
}
|