Add tests, documentation, and website example for Treemap nesting (#4…#6971
Add tests, documentation, and website example for Treemap nesting (#4…#6971ckifer merged 2 commits intorecharts:mainfrom
Conversation
…charts#4580) - Add NestedTreemap.tsx website example demonstrating type='nest' feature - Export new example in TreeMap/index.ts - Add tests for breadcrumb navigation, custom nestIndexContent, and leaf node behavior - Treemap type='nest' allows clicking parent nodes to zoom in, with breadcrumb navigation to go back
WalkthroughAdds tests for Treemap nesting behavior and a new example component demonstrating a nested Treemap. Tests cover breadcrumb navigation to root, custom nestIndexContent rendering, and leaf-click behavior in nest mode. The example component (NestedTreemap) and its registration in the examples index are added. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@PavelVanecek I have addresses the linting issues. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6971 +/- ##
==========================================
- Coverage 91.13% 90.45% -0.68%
==========================================
Files 509 516 +7
Lines 37967 38614 +647
Branches 5287 5346 +59
==========================================
+ Hits 34601 34929 +328
- Misses 3357 3676 +319
Partials 9 9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Add website example, tests, and documentation for the Treemap
type="nest"feature.Changes:
type="nest"with interactive navigationnestIndexContentrenderingRelated Issue
Fixes #4580
Motivation and Context
The Treemap
typeprop wasn't documented or demonstrated anywhere. Withtype="nest":This PR makes the feature discoverable and adds test coverage.
How Has This Been Tested?
Screenshots (if appropriate):
(The example will be visible on the recharts website once merged)
Types of changes
Checklist:
Summary by CodeRabbit
Tests
Documentation