Skip to content

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

Open
svenvg93 wants to merge 1 commit into
henrygd:mainfrom
svenvg93:2026-fix-memory-chart-docker
Open

fix(ui): correct Y-axis tick precision on Docker memory chart#2027
svenvg93 wants to merge 1 commit 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
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"

1 participant