mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Explain Log Rate Spikes: Fix wide time range display with sparse data. (#147129)
The `date_histogram` query was updated to use `min_doc_count: 0` and set `extended_bounds` to the date pickers time range so it returns buckets for all necessary time slots necessary for the full date histogram bar chart.
This commit is contained in:
parent
6b36bc4c72
commit
a152bf98b7
3 changed files with 8 additions and 3 deletions
|
@ -12,9 +12,10 @@ import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import type { WindowParameters } from '@kbn/aiops-utils';
|
||||
|
||||
import { DocumentCountStats } from '../../../get_document_stats';
|
||||
|
||||
import { DocumentCountChart, DocumentCountChartPoint } from '../document_count_chart';
|
||||
import { TotalCountHeader } from '../total_count_header';
|
||||
import { DocumentCountStats } from '../../../get_document_stats';
|
||||
|
||||
const clearSelectionLabel = i18n.translate(
|
||||
'xpack.aiops.documentCountContent.clearSelectionAriaLabel',
|
||||
|
|
|
@ -97,7 +97,7 @@ export const ExplainLogRateSpikesPage: FC<ExplainLogRateSpikesPageProps> = ({
|
|||
queryLanguage: SearchQueryLanguage;
|
||||
filters: Filter[];
|
||||
}) => {
|
||||
// When the user loads saved search and then clear or modify the query
|
||||
// When the user loads a saved search and then clears or modifies the query
|
||||
// we should remove the saved search and replace it with the index pattern id
|
||||
if (currentSavedSearch !== null) {
|
||||
setCurrentSavedSearch(null);
|
||||
|
|
|
@ -71,7 +71,11 @@ export const getDocumentCountStatsRequest = (params: DocumentStatsSearchStrategy
|
|||
date_histogram: {
|
||||
field: timeFieldName,
|
||||
fixed_interval: `${intervalMs}ms`,
|
||||
min_doc_count: 1,
|
||||
min_doc_count: 0,
|
||||
extended_bounds: {
|
||||
min: earliestMs,
|
||||
max: latestMs,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue