Modernize pie charts: Replace C3 with Recharts, improve responsiveness, and add slice navigation (#535) #641
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.
Fixes #535
Tasks
contribution guidelines
your PR Run
tests
locally to check for errors.
applicable
Description
This PR replaces the deprecated C3 charting library with the modern, responsive, and React-friendly Recharts library for all pie charts in ScanCode Workbench.
Recharts improves performance, handles congested labels better, and integrates cleanly with the v4 React renderer. As requested in Issue #535, this PR also adds optional slice-click support—allowing parent components to navigate to corresponding detail views when a user clicks on a pie slice.
Key Changes
<PieChart>,<Pie>,<Cell>,<Tooltip>, and<Legend>.LEGEND_COLORS.onSliceClick(sliceName)callback for interactive navigation.piechart.css: removed old.c3-*rules and added Recharts tooltip styles.CHANGELOG.rstaccordingly.Notes
This PR focuses specifically on replacing C3 pie charts and enabling slice interaction as described in #535. Other chart types can be updated in future enhancements if needed.