Skip to content

Commit

Permalink
[ML] Fix Single metric viewer time slider border not adjusting to win…
Browse files Browse the repository at this point in the history
…dow size changes (#117946) (#118409)

* SMV context brush border investigation

* [ML] Remove smvTimeSlider

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Quynh Nguyen <[email protected]>
  • Loading branch information
kibanamachine and qn895 authored Nov 11, 2021
1 parent 7667ca4 commit 3018f56
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 3018f56

Please sign in to comment.