Graph (old): use timeField.config.interval to apply null insertion logic (#46069)

This commit is contained in:
Leon Sorokin 2022-03-01 23:23:48 -06:00 committed by GitHub
parent 796bc27f75
commit fa99143eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ import {
} from '@grafana/data';
import TimeSeries from 'app/core/time_series2';
import config from 'app/core/config';
import { applyNullInsertThreshold } from '@grafana/ui/src/components/GraphNG/nullInsertThreshold';
type Options = {
dataList: DataFrame[];
@ -30,13 +31,15 @@ export class DataProcessor {
}
for (let i = 0; i < dataList.length; i++) {
const series = dataList[i];
let series = dataList[i];
const { timeField } = getTimeField(series);
if (!timeField) {
continue;
}
series = applyNullInsertThreshold(series, timeField.name);
for (let j = 0; j < series.fields.length; j++) {
const field = series.fields[j];