Skip to content

Commit e206b50

Browse files
authored
[fix] Resolve issue of min/max calculation for single point metrics (#3315)
1 parent 897459a commit e206b50

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Unreleased:
4+
5+
### Fixes:
6+
- Fix min/max calculation for single point metrics (mihran113)
7+
38
## 3.28.0 Mar 21, 2025
49

510
### Enhancements:

aim/web/ui/src/utils/aggregateGroupData.ts

+11
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@ export function aggregateGroupData({
113113
}
114114
}
115115
}
116+
// add special case handling for single point metrics
117+
if (trace.xValues.length === 1) {
118+
const step = trace.xValues[0];
119+
let value = chartXValues.indexOf(step);
120+
let y = trace.yValues[0];
121+
if (yValuesPerX.hasOwnProperty(value)) {
122+
yValuesPerX[value].push(y);
123+
} else {
124+
yValuesPerX[value] = [y];
125+
}
126+
}
116127
}
117128
}
118129

0 commit comments

Comments
 (0)