heatmap: fix error with null values in ES converter (#7999)

This commit is contained in:
Alexander Zobnin 2017-03-31 19:13:26 +04:00 committed by Torkel Ödegaard
parent f77f8ebfc6
commit ecd404335e

View File

@ -30,7 +30,12 @@ function convertEsSeriesToHeatmap(series: TimeSeries, saveZeroCounts = false) {
_.forEach(series.datapoints, point => { _.forEach(series.datapoints, point => {
let bound = series.alias; let bound = series.alias;
let count = point[VALUE_INDEX]; let count = point[VALUE_INDEX];
let values = new Array(count);
if (!count) {
return;
}
let values = new Array(Math.round(count));
values.fill(Number(bound)); values.fill(Number(bound));
let valueBuckets = {}; let valueBuckets = {};