Skip to content

fix(compare): keep chart labels inside the panel, apart and on every gridline - #602

Merged
aitianshi merged 3 commits into
mainfrom
fix/compare-chart-labels-395
Dec 1, 2026
Merged

aitianshi merged 3 commits into
mainfrom
fix/compare-chart-labels-395

Conversation

@aitianshi

Copy link
Copy Markdown
Collaborator

Closes #395
Refs #424

What

  • Scatter y labels ran off the left; now the margin fits.
  • Close tags overlapped; a tag may shift a line.
  • A touching label was dropped; wide labels take fewer ticks.
  • Long readings passed the right edge; now they fit.
  • End x labels sat off their gridlines; now centred if room.
  • A digit draws 7.8 wide, not 7.0.
  • CLI: unchanged, no chart.

Before and after

Before After
Compare charts: labels off the panel, tags overlapping, a gridline without its label The same charts: every label inside its panel, beside its gridline or point
A scatter with cost ticks under a cent: the y labels cut at the left edge The same scatter: the margin fits its y labels
Dots with a reading of 1234/2000: it passes the panel's right edge The same dots: the reading inside the panel
The charts at 390 px, dark, before The charts at 390 px, dark, after

Verified

  • Chromium, 390-1280 px, light and dark: main: 8 labels outside, 5 bare gridlines, 1 tag overlap; now none.
  • 1500 tight clusters of 2-6 runs: tags overlap in 171-198 on main; 1-3 now.
  • Each rule's test fails on main.
  • Backend 3559 (one timing test needed a rerun alone), routes 938.
  • Not checked: Firefox, Safari.

Risk

  • Long readings or y labels narrow the plot.

Agents

  • Claude Code, Opus 5.5

@aitianshi
aitianshi marked this pull request as ready for review December 1, 2026 15:59
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

🟡 PR judge · 4 of 5 yes · #602 ↔ #395

Merge risk 🟠 SIGNIFICANT the judge's reading of the diff
Depth 🟠 HIGH the deepest path is app/nullius/charts.py
Question Verdict
Changes do what the issue asks · 6 of 6 criteria ✅ yes
Issue and pull request describe the same change ✅ yes
Description matches the diff ✅ yes
Diff stays in scope ✅ yes
Risk named in the description ⚠️ partly
Before and after shown –
Acceptance criteria, 6 of 6 met
# Criterion Verdict
1 The scatter's left margin fits its longest y label. ✅ met
2 Tags of close points do not overlap. ✅ met
3 Every gridline keeps its label: fewer ticks when the labels are wide, rather than one dropped. ✅ met
4 A reading never passes the panel's right edge. ✅ met
5 Each x label is centred on its gridline when there is room. ✅ met
6 A test per rule, on the chart's geometry. ✅ met
Checks the script runs itself, 4 of 4 pass
No machine attribution trailer in the commits or the description ✓
New code under app/, docs/, .github/, .agents/ or .claude/ ✓
No Flask import under the backend package ✓
No key-shaped string in the diff ✓

@github-actions github-actions Bot added the needs review Tests pass, no conflict, no verdict on its latest commit label Dec 1, 2026
@aitianshi
aitianshi merged commit 1026a31 into main Dec 1, 2026
6 checks passed
@aitianshi
aitianshi deleted the fix/compare-chart-labels-395 branch December 1, 2026 16:05
@github-actions github-actions Bot removed the needs review Tests pass, no conflict, no verdict on its latest commit label Dec 2, 2026
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.

Compare chart: labels run off the panel, overlap or go missing

1 participant