Skip to content

Commit f5cedd1

Browse files
[ML] Fix Anomaly Explorer population charts when multiple causes in anomaly (#84254) (#84319)
1 parent a6c0e21 commit f5cedd1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

x-pack/plugins/ml/public/application/util/chart_utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ export function chartExtendedLimits(data = [], functionDescription) {
7676
metricValue = actualValue;
7777
}
7878

79-
if (d.anomalyScore !== undefined) {
79+
// Check for both an anomaly and for an actual value as anomalies in detectors with
80+
// by and over fields and more than one cause will not have actual / typical values
81+
// at the top level of the anomaly record.
82+
if (d.anomalyScore !== undefined && actualValue !== undefined) {
8083
_min = Math.min(_min, metricValue, actualValue, typicalValue);
8184
_max = Math.max(_max, metricValue, actualValue, typicalValue);
8285
} else {

0 commit comments

Comments
 (0)