From 37aa3f05153b9bc0618e1613870a8ce200012ec6 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Tue, 28 Jan 2020 12:24:18 +0100 Subject: [PATCH] [ML] Single Metric Viewer: Fix brush update on short recent timespans. --- .../components/timeseries_chart/timeseries_chart.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js index 7ee1c64e189a7..474b4f2470bde 100644 --- a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js +++ b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js @@ -432,6 +432,9 @@ const TimeseriesChartIntl = injectI18n( } focusLoadTo = Math.min(focusLoadTo, contextXMax); + const brushVisibility = focusLoadFrom !== contextXMin || focusLoadTo !== contextXMax; + this.setBrushVisibility(brushVisibility); + if (focusLoadFrom !== contextXMin || focusLoadTo !== contextXMax) { this.setContextBrushExtent(new Date(focusLoadFrom), new Date(focusLoadTo), true); const newSelectedBounds = {