Skip to content

v3: Pie chart no longer supports default active slice without hover #5999

Description

@chanand

Do you want to request a feature or report a bug?

Feature request (possibly a regression from v2)

What is the current behavior?

In Recharts v3, the activeShape prop on <Pie> only renders on mouse hover. There is no way I found to set a slice as “active” by default on initial render.

Previously, in Recharts v2, I could use activeIndex to show a default highlighted slice with a custom activeShape. This was great for visual emphasis (e.g., largest slice) and useful for dashboards and non-interactive environments.

What is the expected behavior?

I would like to show a default active slice using activeShape on initial render, just like we could using activeIndex in Recharts v2.

This is important for:

  • Showing most important data first
  • Static dashboards or PDF exports
  • Touchscreens (no hover support)

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

  • Recharts v3.x (broken)
  • Recharts v2.x (worked perfectly with activeIndex)
  • All browsers and OS

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