From d32db796638cc1cf5330aa2c06e4f3422c51e923 Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Tue, 16 Aug 2022 10:15:32 +0300 Subject: [PATCH] Fix problem with timeseries --- .../public/convert_to_lens/lib/layers/get_layer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/get_layer.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/get_layer.ts index 1d6d603ea5885..d28bb0c889e71 100644 --- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/get_layer.ts +++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/layers/get_layer.ts @@ -16,7 +16,7 @@ import { SUPPORTED_FORMATTERS } from '../formatters'; import { convertSplitFilters } from '../split_chart'; import { convertMetrics, convertFilter } from '../metrics'; import type { Panel, Series } from '../../../../common/types'; -import { TIME_RANGE_DATA_MODES } from '../../../../common/enums'; +import { PANEL_TYPES, TIME_RANGE_DATA_MODES } from '../../../../common/enums'; import { getUISettings } from '../../../services'; import { VisSeries } from '../series'; @@ -82,7 +82,8 @@ export const getLayerConfiguration = ( layer, metricsArray, filter, - model.time_range_mode === TIME_RANGE_DATA_MODES.LAST_VALUE + model.time_range_mode === TIME_RANGE_DATA_MODES.LAST_VALUE && + model.type !== PANEL_TYPES.TIMESERIES ? getWindow(model.interval, timeRange) : undefined );