Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #34103

Closed (moved)
(moved)
Open
Created May 03, 2020 by Karsten Loesing@karsten

Stop rounding y axis labels with units

The Time to download files over Tor graph now displays the following labels, all using seconds as units: 0, 0, 1, 2, 2, 2. Better labels would be 0.0, 0.5, 1.0, 1.5, 2.0, 2.5.

Similarly, the Advertised bandwidth distribution graph showing the median displays the following labels, all using Gbit/s: 0.00, 0.02, 0.05, 0.08. Better labels would be 0.000, 0.025, 0.050, 0.075.

The underlying issue, which we didn't fix in #33933 (moved) nor in #33066 (moved), is that we have to pick a number of digits for a graph which then needs to work for whichever scale is being displayed. In some cases this is difficult to do right (first graph above with measurements apparently getting faster over time), in other cases it's impossible (second graph above with 1st and 99th percentile having different orders of magnitude).

The fix is to stop using the unit_format function from the somewhat outdated scales package that we're using and instead write our own function for formatting labels with units.

I'm going to attach two example graphs where this went wrong plus a patch that I'll review more carefully tomorrow before I deploy it on the server.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking