Skip to content

feat: add interactive PortfolioPie chart component with accessible fa…#524

Open
akinboyewaSamson wants to merge 1 commit into
Predictify-org:mainfrom
akinboyewaSamson:feature/portfolio-pie
Open

feat: add interactive PortfolioPie chart component with accessible fa…#524
akinboyewaSamson wants to merge 1 commit into
Predictify-org:mainfrom
akinboyewaSamson:feature/portfolio-pie

Conversation

@akinboyewaSamson

Copy link
Copy Markdown

closes #451

This PR adds a portfolio distribution chart to the My Predictions page as part of the GrantFox FWC26 campaign.

The chart is a donut-style pie that breaks down a user's total staked amount by prediction status — Active, Pending, Won, and Lost — giving users a quick, visual snapshot of where their stakes sit at any given time.

Hovering a slice highlights it with an animated pop-out effect and shows a tooltip with the exact amount and percentage. On zero positions, a friendly placeholder is shown instead of an empty chart. The component is fully responsive and supports dark mode out of the box using the existing design tokens.

Accessibility was a first-class concern. The chart SVG is hidden from screen readers and replaced with a visually-hidden data table that conveys the same information — label, stake amount, and percentage per slice — meeting WCAG 2.1 AA requirements.

12 unit tests were added covering rendering, SR table correctness, zero-state behaviour, and snapshots. All pass with zero regressions against the existing suite.

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

@TobyKing007 is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@akinboyewaSamson 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.

Add per-user portfolio pie chart

2 participants