mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
fix: dashboard visualization query to ensure accurate chart data (#11108)
#11065
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user