Skip to content

Constrain usage-history charts to their card bounds#200

Merged
LarsLaskowski merged 1 commit into
mainfrom
claude/chart-positioning-bug-88pugz
Jul 23, 2026
Merged

Constrain usage-history charts to their card bounds#200
LarsLaskowski merged 1 commit into
mainfrom
claude/chart-positioning-bug-88pugz

Conversation

@LarsLaskowski

@LarsLaskowski LarsLaskowski commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Fix the usage-history line charts overflowing far below their cards on phone, tablet, and desktop. The chart wrapper CSS now overrides MudBlazor's fit-content minimum sizing, sizes the SVG through flex, and clips the wrapper.

Why

MudBlazor applies min-height: fit-content / min-width: fit-content to the mud-chart element. In the flex layout that minimum overrode the wrapper's height: 100%, so the SVG grew to the intrinsic height of its content (axes, labels, legend) and rendered well beyond the card. With no overflow clipping and a semi-transparent card surface (--dug-surface: rgba(…, 0.82)), the overflowing chart bled into and showed through the neighbouring card. The previously added MatchBoundsToSize did not reliably resolve the ambiguous sizing.

Linked issues

Review notes

Change is limited to .dug-chart rules in wwwroot/app.css: min-width/min-height: 0 on .mud-chart to defeat the fit-content minimums, flex: 1 1 auto on the SVG so it fills the available space alongside the legend, and overflow: hidden on the wrapper as a safeguard against any residual bleed. The fix applies to every breakpoint and to both chart pages (DockerInstances and RuntimeContainerDetail), which share the .dug-chart class. MatchBoundsToSize="true" is retained and now measures a stable size.

Follow-up work

None

MudBlazor sets min-height/min-width fit-content on the chart element, which overrode the wrapper height in the flex layout and let the SVG grow past its card into the tile below. Override those minimums to zero, size the SVG via flex, and clip the wrapper so charts stay within their cards on phone, tablet, and desktop.
@sonarqubecloud

Copy link
Copy Markdown

@LarsLaskowski
LarsLaskowski merged commit d044712 into main Jul 23, 2026
4 checks passed
@LarsLaskowski
LarsLaskowski deleted the claude/chart-positioning-bug-88pugz branch July 23, 2026 16:57
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.

2 participants