@rfkit/charts 1.1.23 → 1.1.25
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.js +8 -13
- package/package.json +1 -1
- package/types/store.d.ts +2 -2
package/index.js
CHANGED
|
@@ -12426,7 +12426,7 @@ const useMarkers = (props)=>{
|
|
|
12426
12426
|
});
|
|
12427
12427
|
const dataRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(new Float32Array());
|
|
12428
12428
|
const formatMarker = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
12429
|
-
const { axisY: {
|
|
12429
|
+
const { axisY: { unit }, axisX: { frequencyFormat } } = getGlobalStoreState(globalID);
|
|
12430
12430
|
let { left } = e;
|
|
12431
12431
|
const { peak } = e;
|
|
12432
12432
|
const rawData = withDatabase(globalID).getAllRawData();
|
|
@@ -12451,16 +12451,15 @@ const useMarkers = (props)=>{
|
|
|
12451
12451
|
left = outsideLeft + insideLeft / multiple;
|
|
12452
12452
|
const frequencyStr = frequencyFormat(left);
|
|
12453
12453
|
const frequency = parseFloat(frequencyStr);
|
|
12454
|
-
const level = data[xIndex]
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
|
|
12454
|
+
const level = data[xIndex];
|
|
12455
|
+
if (void 0 !== level && !Number.isNaN(level)) {
|
|
12456
|
+
const virtualLevel = getVirtualLevel(unit, level)?.toFixed?.(1);
|
|
12457
|
+
e.level = parseFloat(virtualLevel);
|
|
12458
|
+
}
|
|
12458
12459
|
return {
|
|
12459
12460
|
...e,
|
|
12460
12461
|
left,
|
|
12461
|
-
|
|
12462
|
-
frequency,
|
|
12463
|
-
level: levelNum
|
|
12462
|
+
frequency
|
|
12464
12463
|
};
|
|
12465
12464
|
}, [
|
|
12466
12465
|
globalID
|
|
@@ -12479,9 +12478,7 @@ const useMarkers = (props)=>{
|
|
|
12479
12478
|
color: markerColor,
|
|
12480
12479
|
select: false,
|
|
12481
12480
|
peak: false,
|
|
12482
|
-
top: 0,
|
|
12483
12481
|
frequency: 0,
|
|
12484
|
-
level: 0,
|
|
12485
12482
|
hover: false
|
|
12486
12483
|
});
|
|
12487
12484
|
const newMarker = {
|
|
@@ -12584,9 +12581,7 @@ const useMarkers = (props)=>{
|
|
|
12584
12581
|
color: markerColor,
|
|
12585
12582
|
select: false,
|
|
12586
12583
|
peak: isPeak,
|
|
12587
|
-
top: 0,
|
|
12588
12584
|
frequency: 0,
|
|
12589
|
-
level: 0,
|
|
12590
12585
|
hover: false
|
|
12591
12586
|
});
|
|
12592
12587
|
newMarkers.push({
|
|
@@ -12869,7 +12864,7 @@ const MarkerItem = ({ marker })=>{
|
|
|
12869
12864
|
axisX.unit
|
|
12870
12865
|
]
|
|
12871
12866
|
}),
|
|
12872
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12867
|
+
void 0 !== marker.level && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
12873
12868
|
children: [
|
|
12874
12869
|
marker.level,
|
|
12875
12870
|
axisY.unit
|
package/package.json
CHANGED
package/types/store.d.ts
CHANGED
|
@@ -70,12 +70,12 @@ export interface MarkerType {
|
|
|
70
70
|
id: string;
|
|
71
71
|
color: string;
|
|
72
72
|
left: number;
|
|
73
|
-
top
|
|
73
|
+
top?: number;
|
|
74
74
|
hover: boolean;
|
|
75
75
|
peak: boolean;
|
|
76
76
|
select: boolean;
|
|
77
77
|
frequency: number;
|
|
78
|
-
level
|
|
78
|
+
level?: number;
|
|
79
79
|
}
|
|
80
80
|
export interface MarkerProps {
|
|
81
81
|
enabled: boolean;
|