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