mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Fix data value passed to Single Metric viewer chart for anomaly where source data is missing (#154014)
This commit is contained in:
parent
6208a56adb
commit
3930f7aa99
1 changed files with 1 additions and 5 deletions
|
@ -166,11 +166,7 @@ export function processDataForFocusAnomalies(
|
|||
if (record.actual !== undefined) {
|
||||
// If cannot match chart point for anomaly time
|
||||
// substitute the value with the record's actual so it won't plot as null/0
|
||||
if (chartPoint.value === null) {
|
||||
chartPoint.value = record.actual;
|
||||
}
|
||||
|
||||
if (record.function === ML_JOB_AGGREGATION.METRIC) {
|
||||
if (chartPoint.value === null || record.function === ML_JOB_AGGREGATION.METRIC) {
|
||||
chartPoint.value = Array.isArray(record.actual) ? record.actual[0] : record.actual;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue