Skip to content

Stack the chart legends below the plots up to 950px - #124

Open
bendichter wants to merge 2 commits into
mainfrom
legend-stack-breakpoint
Open

Stack the chart legends below the plots up to 950px#124
bendichter wants to merge 2 commits into
mainfrom
legend-stack-breakpoint

Conversation

@bendichter

@bendichter bendichter commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixes the empty space to the right of the dashboard charts at narrow window widths. Two changes, and the second is the actual root cause:

  • Stretch the stacked column. The stacked layout inherited align-items: flex-start from the base rule, which in column direction sizes children to their content width. An SVG with width: 100% has no intrinsic width, so the chart div collapsed to the 300px replaced-element fallback and the rest of the figure sat empty to its right. This bug was present on phones all along. Verified live in the browser: with the column layout forced, the chart measured 300px in an 843px container before the fix and fills all 843px with align-items: stretch.
  • Stack the legends below the plots up to 950px. Between about 700 and 950px the fixed side legend column squeezed the charts; the side layout now applies only above 950px, where the chart still gets about 700px of width.

🤖 Generated with Claude Code

https://claude.ai/code/session_014827duyb34XeyPz1XF4mmt

At window widths between about 700 and 950px, half a laptop screen,
the dashboard kept the legend in its fixed side column, which squeezed
the charts to around 500px and left the mostly empty legend column as
dead space on the right. The side layout now applies only above 950px,
where the chart still gets about 700px of width; below that the legend
stacks under the chart as it already did on phones.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014827duyb34XeyPz1XF4mmt
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for catalystneuro ready!

Name Link
🔨 Latest commit 00bd2cd
🔍 Latest deploy log https://app.netlify.com/projects/catalystneuro/deploys/6a8f4a6224367f00082cf0da
😎 Deploy Preview https://deploy-preview-124--catalystneuro.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

The stacked layout inherited align-items: flex-start from the base
rule, which in column direction sizes children to their content width.
An SVG with width 100 percent has no intrinsic width, so the chart div
collapsed to the 300px replaced-element fallback and the rest of the
figure sat empty to its right. This was the actual cause of the empty
space at narrow widths, present on phones all along; the breakpoint
change alone widened the range where it showed. Verified in the
browser: the chart went from 300px to filling the 843px container.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014827duyb34XeyPz1XF4mmt
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