From 81381506ade1b2567c03f047305f585c43e3093d Mon Sep 17 00:00:00 2001 From: Faisal Kanout Date: Fri, 24 Nov 2023 17:03:56 +0300 Subject: [PATCH] [BUG][OBX-UX-MNGMT] Apply the query on the EmbeddableComponent instead of the base layer (#171861) ## Summary It fixes #171710 Screenshot 2023-11-23 at 14 03 57 --- .../components/preview_chart/preview_chart.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/observability/public/components/custom_threshold/components/preview_chart/preview_chart.tsx b/x-pack/plugins/observability/public/components/custom_threshold/components/preview_chart/preview_chart.tsx index d5a8b763ca7b5..23d27a554a77c 100644 --- a/x-pack/plugins/observability/public/components/custom_threshold/components/preview_chart/preview_chart.tsx +++ b/x-pack/plugins/observability/public/components/custom_threshold/components/preview_chart/preview_chart.tsx @@ -218,12 +218,7 @@ export function PreviewChart({ decimals: isPercent ? 0 : 2, }, }, - filter: { - language: 'kuery', - query: filterQuery || '', - }, }; - const xYDataLayerOptions: XYLayerOptions = { buckets: { type: 'date_histogram', @@ -252,7 +247,6 @@ export function PreviewChart({ value: layer.value, label: layer.label, format: layer.format, - filter: layer.filter, })), options: xYDataLayerOptions, }); @@ -333,6 +327,10 @@ export function PreviewChart({ timeRange={{ from: `now-${timeSize * 20}${timeUnit}`, to: 'now' }} attributes={attributes} disableTriggers={true} + query={{ + language: 'kuery', + query: filterQuery || '', + }} /> );