Position History: outcome donut with click-to-filter#44
Merged
heyitsStylez merged 3 commits intomainfrom May 6, 2026
Merged
Conversation
Replaces the outcome pills with an SVG donut chart at >= 10 settled trades. Each slice toggles the existing setHistOutcome filter. - New pure helper outcomeDistribution(trades, assetFilter) with EXPIRED/ASSIGNED/CALLED/CLOSED ordering and CLOSED closeCost netting - Donut respects asset-filter chips, ignores From/To date pickers - CSS-variable colours only (EXPIRED/ASSIGNED/CALLED/CLOSED) - Clicking the active slice clears the filter (idempotent toggle) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The donut felt too small and left-anchored on a wide row. The treemap fills the full width, sizes cells by trade count, and shows outcome, count, and premium inline without a tooltip. Click-to-filter behaviour unchanged. - Renamed module to 06a-render-outcome-chart.js (rOutcomeChart) - Renamed wrapper id #hist-donut → #hist-outchart, classes follow suit - Replaced donut CSS with treemap cell styles - Updated integration tests to assert on .outchart-cell Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #37.
Summary
outcomeDistribution(trades, assetFilter)insrc/js/05c-outcome-distribution.js(dual-exported, EXPIRED/ASSIGNED/CALLED/CLOSED order, CLOSED netscloseCost)rHistDonut()insrc/js/06a-render-donut.js— at ≥10 settled trades the donut replaces the outcome pills; each slice togglessetHistOutcome(clicking the active slice clears the filter)Test plan
npm test— 8 new unit tests + 5 new integration tests (72 total, all green)python3 build.py --checkpasses🤖 Generated with Claude Code