recharts / recharts

Redefined chart library built with React and D3
http://recharts.org
MIT License
22.95k stars 1.67k forks source link

Activeshape mouseleave fix #4527

Closed PavelVanecek closed 2 weeks ago

PavelVanecek commented 2 weeks ago

Description

I missed this piece of logic when moving the activeIndex from props cloning to context. Fixed!

Related Issue

Reported in https://github.com/recharts/recharts/pull/4524#discussion_r1599539504

Motivation and Context

bugfix

How Has This Been Tested?

npm test, storybook

I used this codesandbox to compare with 2.x behaviour: https://codesandbox.io/p/sandbox/jovial-nova-s67t7p?file=%2Fsrc%2FApp.tsx%3A48%2C38

Here is the 2.x code to compare: https://github.com/recharts/recharts/blob/master/src/chart/generateCategoricalChart.tsx#L2002

Screenshots (if appropriate):

Types of changes

Checklist:

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.52%. Comparing base (f260ab4) to head (20145c5).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 3.x #4527 +/- ## ======================================= Coverage 95.52% 95.52% ======================================= Files 116 116 Lines 22101 22101 Branches 3045 3045 ======================================= Hits 21113 21113 Misses 982 982 Partials 6 6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.