Skip to content

feat: add candlestick vs line chart toggle with localStorage persistence - #368

Merged
josephchimebuka merged 4 commits into
TevaLabs:mainfrom
fredericklamar342-prog:feat/issue-310-candlestick-toggle
Aug 3, 2026
Merged

feat: add candlestick vs line chart toggle with localStorage persistence#368
josephchimebuka merged 4 commits into
TevaLabs:mainfrom
fredericklamar342-prog:feat/issue-310-candlestick-toggle

Conversation

@fredericklamar342-prog

Copy link
Copy Markdown
Contributor

Summary

Closes #310

Changes

  • Added CandlestickSeries support in PriceChart using Lightweight Charts
  • Added toggle UI button (Line / Candle) with brand colors: green (#22C55E) for up, pink (#EC4899) for down
  • Persisted chart mode preference in localStorage so it survives page refresh
  • Added toCandlestickData conversion helper in PriceChart.helpers
  • Prevented RAF race condition when switching modes by canceling pending data-update RAFs

Screenshots

Testing

  • npx tsc --noEmit — passes
  • npx vitest run src/components/PriceChart.helpers.test.ts — 5/5 tests pass
  • npx eslint src/components/PriceChart.tsx src/components/PriceChart.helpers.ts — clean

- Add CandlestickSeries support in PriceChart using Lightweight Charts
- Add toggle UI button with brand colors (green #22C55E / pink #EC4899)
- Persist chart mode preference in localStorage
- Add toCandlestickData conversion helper in PriceChart.helpers
- Prevent RAF race condition on mode switch

Closes TevaLabs#310
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@fredericklamar342-prog is attempting to deploy a commit to the josephchimebuka's projects Team on Vercel.

A member of the Team first needs to authorize it.

…cy conflict

Fixes CI failure — vite-plugin-pwa@0.18.2 requires vite ^3-5,
but the project uses vite ^7. v1.3.0 supports vite 7.
- Remove unused imports: NotFound (App.tsx), initialsFromName (ProfileSummaryCard, Profile), MOCK_ADDRESS (e2e), unused eslint-disable (RoundCard)
- Add eslint-disable for intended set-state-in-effect (CommandPalette, OnboardingChecklist, RoundTimer)
- Add eslint-disable for missing deps (AvatarCropModal)
- Add missing imports: useTranslation, ChangeEvent (Navbar)
- Fix type narrowing with unknown cast (xelma-contract)
- Add explicit types to PWA register callbacks (main.tsx)
7 new tests covering: empty input, single/multiple points, zero
values, negative values, high-precision decimals, and immutability.
@josephchimebuka
josephchimebuka merged commit 56c6677 into TevaLabs:main Aug 3, 2026
0 of 2 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Aug 3, 2026
2 tasks
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.

Add candlestick vs line chart toggle

2 participants