Skip to content

Feat/dark mode chart colors#669

Open
theFirstCodeManiac wants to merge 2 commits intoHahfyeex:Defaultfrom
theFirstCodeManiac:feat/dark-mode-chart-colors
Open

Feat/dark mode chart colors#669
theFirstCodeManiac wants to merge 2 commits intoHahfyeex:Defaultfrom
theFirstCodeManiac:feat/dark-mode-chart-colors

Conversation

@theFirstCodeManiac
Copy link
Copy Markdown
Contributor

Closes #589

Description

This PR implements theme-aware chart colors for all Recharts components, ensuring proper visibility and consistency across both dark and light modes. It removes hardcoded color values and introduces a dynamic system that responds instantly to theme changes.


Type of Change

  • New feature (non-breaking change which adds functionality)
  • UI/UX improvement
  • Code refactoring
  • Test coverage improvement

Changes Made

  • Created useChartColors hook to provide theme-based color palettes
  • Implemented ChartThemeProvider for centralized color management
  • Replaced all hardcoded chart colors with dynamic values from the hook
  • Added MutationObserver to detect and respond to theme changes in real-time
  • Ensured visual consistency with design system in both dark and light modes
  • Added unit tests for theme color validation

Testing

  • Verified charts render correctly in both dark and light modes
  • Confirmed instant updates on theme toggle without reload
  • Added tests for color values across themes
  • All tests pass with >90% coverage

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my feature works
  • New and existing unit tests pass locally

Screenshots (if applicable)

N/A


Additional Notes

This implementation ensures charts remain accessible, visually consistent, and fully responsive to theme changes without introducing performance overhead.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@theFirstCodeManiac Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FE] Implement Dark Mode Aware Chart Colors for Recharts

2 participants