At most one charting library
Why it matters
Two charting libraries means two SVG-rendering approaches, two theming systems, and two tooltip conventions. Recharts' composable React pattern sits next to Chart.js's imperative canvas API and the resulting charts look and behave like they came from different products. Bundle size grows by 50 to 200 KB for the redundant library, which matters on mobile and on dashboard-heavy pages where Core Web Vitals already hover near Lighthouse thresholds.
Severity rationale
Info because charting drift is bundle weight and visual inconsistency, not correctness or security.
Remediation
Pick one library and rewrite every chart. Inventory with grep -rl "from 'recharts'" src/components/ and the Chart.js equivalent, then consolidate chart components under src/components/charts/ so shared theming lives in one place.
# After every import points to the survivor:
npm uninstall recharts
Centralize color palette, axis defaults, and tooltip styling in src/components/charts/theme.ts so every future chart inherits the system automatically.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Multi-Session Drift Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-slop-code-drift·automated