Fix activeBar highlighting with missing/null data#7001
Merged
Conversation
…inal data index Co-authored-by: PavelVanecek <[email protected]>
Co-authored-by: PavelVanecek <[email protected]>
Co-authored-by: PavelVanecek <[email protected]>
Copilot
AI
changed the title
[WIP] Fix activeBar scaling issue due to missing data
Fix activeBar highlighting with missing/null data
Feb 12, 2026
PavelVanecek
marked this pull request as ready for review
February 13, 2026 13:24
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7001 +/- ##
=======================================
Coverage 90.10% 90.10%
=======================================
Files 522 522
Lines 38848 38851 +3
Branches 5347 5348 +1
=======================================
+ Hits 35004 35007 +3
Misses 3835 3835
Partials 9 9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Staging Deployment Details
These deployments will remain available for 30 days. To update snapshots: Comment |
Collaborator
PavelVanecek
approved these changes
Feb 13, 2026
Bundle ReportChanges will increase total bundle size by 656 bytes (0.02%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: recharts/bundle-cjsAssets Changed:
view changes for bundle: recharts/bundle-umdAssets Changed:
view changes for bundle: recharts/bundle-es6Assets Changed:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
activeBar highlighting jumps to wrong bars when data contains null values. The tooltip's
activeIndexreferences the original data array, but bar rendering uses the filtered array (nulls removed), causing index mismatch.Changes:
originalDataIndexfield toBarRectangleItemto preserve data position before null filteringBarRectangleWithActiveStateto compare usingoriginalDataIndexinstead of filtered array indexExample with missing data:
Related Issue
See linked issue for reproduction case and screenshot showing incorrect highlighting offset.
Motivation and Context
Filtering null bars renumbers array indices, breaking the activeBar/tooltip index contract. This is fundamental to correct hover behavior with sparse data.
How Has This Been Tested?
Screenshots (if appropriate):
See issue for before/after showing highlight jumping to wrong bar.
Types of changes
Checklist:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.