Skip to content

web: Fix Y-Axis labels

Administrator requested to merge jdb/fix-y-axis-labels into main

Created by: unclejustin

Naive implementation. Just make the padding bigger 🤷

Check these screenshots 🔍 notice that the left text doesn't line up perfectly. I don't think that's an issue, but I defer to design for that one.

However, coding up a dynamic solution may be non-trivial. Not hard, but we'd have to find if any number in any of the data arrays is greater than 999 then adjust padding upward if so. Not a big deal on small data arrays, but we don't have absolute control over how big these might be 😬

Original

original

Padding < 1000

padding

Padding > 1000

padding-k

Padding > 1,000,000

padding-m

Note regarding the above. D3 intelligently caps this at 3 digits + 1 character. So that is the maximum width Y will ever be.

Fixes #21958 (closed)

Merge request reports

Loading