Skip to content

Commit

Permalink
Added "- marginTop" in the _convertAreaToCoordinates function when en…
Browse files Browse the repository at this point in the history
…ableX and enableY are set to account for the vertical margin and prevent inaccuracies in y selection.
  • Loading branch information
s-heap authored and SimonHeap committed Sep 4, 2019
1 parent 80a0331 commit a422525
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plot/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ class Highlight extends AbstractSeries {

if (enableX && enableY) {
return {
bottom: yScale.invert(brushArea.bottom),
bottom: yScale.invert(brushArea.bottom - marginTop),
left: xScale.invert(brushArea.left - marginLeft),
right: xScale.invert(brushArea.right - marginLeft),
top: yScale.invert(brushArea.top)
top: yScale.invert(brushArea.top - marginTop)
};
}

Expand Down

0 comments on commit a422525

Please sign in to comment.