@rfkit/charts 1.0.101 → 1.0.103

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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -14000,13 +14000,13 @@ function useTemplateComparison() {
14000
14000
  templateOverData.forEach((overData)=>{
14001
14001
  const { startIndex, endIndex } = overData;
14002
14002
  const totalLength = templateOverData.length;
14003
- const startPercent = (startIndex + 1) * 100 / totalLength;
14004
- const endPercent = (endIndex + 1) * 100 / totalLength;
14003
+ const startPercent = (startIndex + 0.5) * 100 / totalLength;
14004
+ const endPercent = (endIndex + 0.5) * 100 / totalLength;
14005
14005
  const centerPercent = (startIndex + endIndex) / 2 * 100 / totalLength;
14006
14006
  const startFreq = frequencyFormatRef.current(startPercent);
14007
14007
  const stopFreq = frequencyFormatRef.current(endPercent);
14008
14008
  const centerFreq = frequencyFormatRef.current(centerPercent);
14009
- segments.push({
14009
+ if (startFreq !== stopFreq) segments.push({
14010
14010
  ...overData,
14011
14011
  frequency: centerFreq,
14012
14012
  bandwidth: (stopFreq - startFreq) * 1000,
package/package.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "types": "index.d.ts",
6
6
  "author": "Hxgh",
7
7
  "license": "MIT",
8
- "version": "1.0.101",
8
+ "version": "1.0.103",
9
9
  "private": false
10
10
  }