fix(Sensitivity): modernize tornado chart and prevent label collisions - #28
Merged
Conversation
Screenshot feedback showed two issues on the Sensitivity tab's tornado chart: - Worst-case value annotations collided with the row labels when a bar extended far to the left (e.g. "Nightly Rate -$2,387" overlapping the "Nightly Rate" row label). - Raw red / green / slate colors instead of the design-system tokens. Changes - Value placement: when a downside or upside bar is >= 64px wide, the value text is rendered centered INSIDE the bar in var(--canvas) for contrast. Narrow bars still render the value outside (end-anchored left of a downside bar, start-anchored right of an upside bar) but never reach past the label column because the bar itself is close to the baseline. - Tokens throughout: bar fills var(--negative) / var(--accent), baseline line + dashed baseline-input line var(--rule-strong), row labels var(--ink-2), axis labels var(--ink-3). - Typography: serif 22px chart title, caps "Baseline" label + mono value, mono (tabular-nums) for every numeric annotation, sans for row labels. - Container: border border-rule-strong rounded p-6 (dropped the bg-white / shadow / rounded-xl look). - Metric selector: replaced the slate pill row with a <Segmented> (ink-bg active state, matches the rest of the app). - Legend: token-colored swatches + caps labels; help copy styled caps. - DrillDownChart modernized alongside — accent stroke/points with canvas ring on the baseline dot, rule-strong dashed zero + baseline-input lines, mono axis labels, border card shell. No data / API changes — getTornado / getLTRTornado and TornadoData / TornadoBar types are untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tdody
added a commit
that referenced
this pull request
Apr 20, 2026
Phase 2 PRs 1–7 all shipped under THI-45 through THI-54 before this tracker was committed. Audit on 2026-04-19 confirmed `frontend/src/index.css` tokens match `README.md` spec exactly (no drift, light + dark). Phase 2 PR 8 (polish pass) is in-progress with #26/#27/#28 landed. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Problem
Screenshot feedback showed two issues on the Sensitivity tab's tornado chart:
Changes
Collision fix
var(--canvas)fill for contrast.Design-system integration
var(--negative)/var(--accent); baseline + baseline-input dashed lines usevar(--rule-strong); row labelsvar(--ink-2); axis labelsvar(--ink-3).border border-rule-strong rounded p-6(dropped the oldbg-white/ shadow /rounded-xllook).<Segmented>(ink-bg active state, same pattern as the rest of the app).DrillDownChartmodernized alongside — accent stroke / points with canvas-ring on the baseline dot, rule-strong dashed zero + baseline-input lines, mono axis labels, border card shell.Preserved behavior
No data or API changes —
getTornado/getLTRTornadocalls, theTornadoData/TornadoBartypes, and the click-to-drill-down interaction are all unchanged.Verification
npm run lint— cleannpm run build— passes🤖 Generated with Claude Code