-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugGeneral bug labelGeneral bug label
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Given a LineChart with a numerical X axis, if a margin is set on the LineChart component and the domain is also set so that all dots are outside the domain, the active dot will appear outside the graph on hover.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar (template: https://codesandbox.io/p/sandbox/simple-line-chart-v25dl4).
I was able to reproduce the behaviour on the Recharts website https://recharts.org/en-US/examples/HighlightAndZoomLineChart with the following code https://pastebin.com/mFYKLpsZ. The initial state is the most relevant part.

What is the expected behavior?
The active dot should be hidden if no dots are within the viewbox.
Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?
Tested in 2.12.7 and also used the Recharts website. Have used Chrome 129 on macOS 14.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugGeneral bug labelGeneral bug label