Skip to content
Snippets Groups Projects

web: Fix Y-Axis labels

Merged Warren Gifford requested to merge jdb/fix-y-axis-labels into main

Created by: unclejustin

Naive implementation. Just make the padding bigger :shrug:

Check these screenshots :mag: 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 :grimacing:

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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading