Skip to content

Commit

Permalink
Fix tooltips that disappear while mouse still over a scatter point
Browse files Browse the repository at this point in the history
Reported here: recharts/recharts.org#45

Reproducible in this jsfiddle:

https://jsfiddle.net/alidingling/uLysj0u2/

This happens because the cursor draws on top of the scatter. Once it appears, it starts snagging mouse events which belong to the scatter. The behavior becomes even more pronounced as the scatter dots get smaller.

It probably does not make sense for the cursor ever to receive pointer events.
  • Loading branch information
paulmelnikow committed Jul 3, 2018
1 parent db0f3f2 commit b6faf50
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/chart/generateCategoricalChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,7 @@ const generateCategoricalChart = ({
const key = element.key || '_recharts-cursor';
const cursorProps = {
stroke: '#ccc',
pointerEvents: 'none',
...offset,
...restProps,
...getPresentationAttributes(element.props.cursor),
Expand Down

0 comments on commit b6faf50

Please sign in to comment.