Skip to content

Brush component displays all bars instead of selected range when using start/end indices with many bars #6258

Description

@ariel-upstream

What is the current behavior?

When using the Brush component with a large number of bars and specifying the start and end indices, if the page state changes, the brush range incorrectly displays all bars instead of the user-selected range.

What is the expected behavior?

The brush should only display the bars within the selected range, regardless of page state changes.

Please provide a demo of the problem in a sandbox

A reproducible demo can be created by setting up a chart with many bars and using the Brush component. Change the page state and observe that the brush range resets to show all bars, not the user-selected range.

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

Please specify the Recharts version, browser, and OS where the issue occurs. If applicable, note whether this behavior differs in previous versions.

Version: "recharts": "3.1.2",

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionUse this label when an issue is submitted without proper reproduction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions