From 3018f56bd19005c6bc6e4b354e304d65ea90dd38 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 11 Nov 2021 14:39:23 -0500 Subject: [PATCH] [ML] Fix Single metric viewer time slider border not adjusting to window size changes (#117946) (#118409) * SMV context brush border investigation * [ML] Remove smvTimeSlider Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com> --- .../components/timeseries_chart/timeseries_chart.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js index cad5bb68fb62b..31cdfa5df0576 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js @@ -1203,15 +1203,16 @@ class TimeseriesChartIntl extends Component { .call(brush) .selectAll('rect') .attr('y', -1) - .attr('height', contextChartHeight + swimlaneHeight + 1); + .attr('height', contextChartHeight + swimlaneHeight + 1) + .attr('width', this.vizWidth); + + const handleBrushExtent = brush.extent(); // move the left and right resize areas over to // be under the handles contextGroup.selectAll('.w rect').attr('x', -10).attr('width', 10); - contextGroup.selectAll('.e rect').attr('x', 0).attr('width', 10); - - const handleBrushExtent = brush.extent(); + contextGroup.selectAll('.e rect').attr('transform', null).attr('width', 10); const topBorder = contextGroup .append('rect') @@ -1247,6 +1248,7 @@ class TimeseriesChartIntl extends Component { function brushing() { const brushExtent = brush.extent(); mask.reveal(brushExtent); + leftHandle.attr('x', contextXScale(brushExtent[0]) - 10); rightHandle.attr('x', contextXScale(brushExtent[1]) + 0);