You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in stacked charts where duplicate categorical data causes rendering issues. The fix ensures that when allowDuplicatedCategory is enabled, the chart uses index-based positioning instead of relying on the data key value for tooltip positioning.
Key Changes
Modified combineDisplayedStackedData to use index-based positioning when allowDuplicatedCategory is true
Added comprehensive unit tests to verify the fix for stacked bar charts with duplicate categorical data
Added visual regression tests to prevent future regressions
Reviewed Changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 2 comments.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.74%. Comparing base (bdf962a) to head (5334fde). ⚠️ Report is 4 commits behind head on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I missed this use-case when refactoring.
Related Issue
Fixes #6192
How Has This Been Tested?
unit + VR tests
Screenshots (if appropriate):
https://github.com/recharts/recharts/pull/6194/files#diff-915bfdd6ee0e23439c6b300c92d732954fd0e01d4b409d82d8d369749877e1a9
Types of changes
Checklist: