Skip to content

Keyboard navigation breaks when zoomed in #7055

@cameronm-orion

Description

@cameronm-orion

Steps to reproduce

  1. Use the Highlight and Zoom Line Chart example.
  2. Zoom into a part of the chart that has data both inside and outside of the viewport using click and drag.
  3. Focus the chart with tab and use the right arrow key to move from the points visible to ones off the chart.
  4. Use the left arrow key to move back to points visible on the chart.

What is the current behavior?

Once the active point is set to a point outside the currently visible domain, the arrow keys stop working and you cannot set the active point back to points inside the visible domain with the arrow keys.

What is the expected behavior?

I should be able to press the left arrow key to highlight visible points on the chart.

Please provide a demo of the problem in a sandbox

Replicated in: https://stackblitz.com/edit/jmoysgu8?file=src%2FExample.tsx

Screen.Recording.2026-02-25.at.12.51.20.PM.mov

Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?

Tested in Recharts 3.7.0, macOS 26 Tahoe, Chrome 145. It did use to work in Recharts 2.12.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions