Skip to content

Commit

Permalink
[ML] Fix Anomaly Explorer population charts when multiple causes in a…
Browse files Browse the repository at this point in the history
…nomaly (#84254) (#84318)
  • Loading branch information
peteharverson authored Nov 25, 2020
1 parent 563a47e commit accd2d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x-pack/plugins/ml/public/application/util/chart_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ export function chartExtendedLimits(data = [], functionDescription) {
metricValue = actualValue;
}

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

0 comments on commit accd2d0

Please sign in to comment.