Recharts, how to position the tooltip to the left and top side of the cursor

31 views Asked by At

With Recharts we have the Tooltip component, and by default when hovering a chart the tooltip follows the cursor and it spans to the right and bottom of the cursor. I need to make it span to the left and top, becuase the chart itself is located on the right part of the screen and it causes issues.

From the docs here https://recharts.org/en-US/api/Tooltip, there is a prop "position" but this sets the tooltip to be fixed, which I don't want I still want it to follow the cursor. Setting the "coordinate" prop doesn't seem to do anything.

0

There are 0 answers