Skip to content

fix(ui): correct Y-axis tick precision on Docker memory chart - #2027

Merged
henrygd merged 2 commits into
henrygd:mainfrom
svenvg93:2026-fix-memory-chart-docker
Aug 13, 2026
Merged

henrygd merged 2 commits into
henrygd:mainfrom
svenvg93:2026-fix-memory-chart-docker

Conversation

@svenvg93

Copy link
Copy Markdown
Collaborator

📃 Description

Fix incorrect Y-axis tick label precision on the Docker/Podman Memory Usage chart. Because container memory is stored in MB, the raw value (val) was always ≥ 10, so toFixedFloat was always called with 0 decimal places. This caused values in the 1–10 GB range to be rounded to the nearest whole GB, producing duplicate and misleading tick labels (e.g. both 1.2 GB and 1.5 GB displaying as "1 GB", and 1.8 GB displaying as "2 GB"), making the axis appear non-linear.

Also corrects a wrong JSDoc comment on the container Stats type — memory is in MB, not GB.

closes #2026

🪵 Changelog

🔧 Fixed

  • Docker/Podman Memory Usage chart: Y-axis tick labels for values in the 1–10 GB range now show one decimal place (e.g. "1.8 GB") instead of rounding to the nearest whole GB, preventing duplicate or misleading tick labels

@svenvg93
svenvg93 requested a review from henrygd as a code owner May 20, 2026 15:43

@henrygd henrygd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@henrygd
henrygd merged commit 35af36f into henrygd:main Aug 13, 2026
1 check passed
@svenvg93
svenvg93 deleted the 2026-fix-memory-chart-docker branch August 14, 2026 08:54
xiaoran7 pushed a commit to xiaoran7/beszel that referenced this pull request Oct 17, 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.

[Bug]: Strange Y-Axis scaling on "Docker Memory Usage"

2 participants