Skip to content

fix(results-panel): replace Recharts bars with CSS bars so full label text is always visible#201

Merged
sacha-l merged 1 commit into
developfrom
fix/feedback-css-bars
Jun 25, 2026
Merged

fix(results-panel): replace Recharts bars with CSS bars so full label text is always visible#201
sacha-l merged 1 commit into
developfrom
fix/feedback-css-bars

Conversation

@sacha-l

@sacha-l sacha-l commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Problem

Recharts horizontal bar chart clips long Y-axis labels at the container edge regardless of the computed width prop. Sentence-length options like "Agent bought and paid on its own, running in about an hour" were rendering as "gent bought and paid on its…" — the leading characters chopped off by Recharts' internal canvas clipping.

The dynamic yAxisWidth / tickFormatter approach from #199 still couldn't fix this because Recharts clips the label text at the pixel boundary of the axis, not at the character boundary of the formatter.

Fix

Replace the entire BarChart / ResponsiveContainer / YAxis stack with a plain CSS implementation:

Test plan

  • cd client && npm run build
  • In dev:harness: all 6 feedback charts show full option text with readable bars
  • In production: "WHERE DID YOU LAND?" shows full sentences like "Agent bought and paid on its own, running in about an hour"

… text is always visible

Recharts horizontal bar chart clips long Y-axis labels at the container
edge regardless of the computed width — sentence-length options like
'Agent bought and paid on its own, running in about an hour' were showing
as 'gent bought and paid on its...' with the leading characters cut off.

Replace the Recharts BarChart/ResponsiveContainer stack with a plain CSS
implementation: full label text on one line, 2px bar scaled to max value,
count on the right. No truncation, no Canvas 0-width bug, no Recharts
import in this component.
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stadium Ready Ready Preview, Comment Jun 25, 2026 7:13pm

@sacha-l sacha-l merged commit d5c7ab1 into develop Jun 25, 2026
2 checks passed
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.

1 participant