From d33746e7d2cb4b18f4d85f99e8ab16bd0effb61d Mon Sep 17 00:00:00 2001 From: ktx-vaidehi <134508096+ktx-vaidehi@users.noreply.github.com> Date: Wed, 1 Apr 2026 20:57:28 +0530 Subject: [PATCH] fix: dashboard visualization query to ensure accurate chart data (#11108) #11065 --- web/src/plugins/logs/Index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/src/plugins/logs/Index.vue b/web/src/plugins/logs/Index.vue index f1b746e6cc..a2e30e58a2 100644 --- a/web/src/plugins/logs/Index.vue +++ b/web/src/plugins/logs/Index.vue @@ -1940,12 +1940,22 @@ export default defineComponent({ searchObj?.meta?.showHistogram === true ) { // replace hits with histogram query data + // Override time_offset with the full query time range so that + // fillMissingValues uses the correct start time. The main search + // time_offset only covers the current page (last N rows), which + // would cause the chart to display partial data. searchResponseForVisualization.value = { ...searchObj.data.queryResults, hits: searchObj.data.queryResults.aggs, histogram_interval: searchObj?.data?.queryResults ?.visualization_histogram_interval, + time_offset: { + start_time: + searchObj?.data?.customDownloadQueryObj?.query?.start_time, + end_time: + searchObj?.data?.customDownloadQueryObj?.query?.end_time, + }, }; // assign converted_histogram_query to dashboardPanelData