Skip to content

Provide options to configure displayed units in charts

Issue

Screen_Shot_2020-01-16_at_12.04.48_pm

Chart values are currently displayed using engineering notation (SI) units by default, there is also no visual indication that this is the case. This left me scratching my head figuring out why I was seeing values of 2, 1, 500m, 0

Additionally, we should also provide an option for values to be rounded to an integer for cases where it does not make sense to use decimals (ie 0.5 of a merge request)

Possible solutions

  • We could expose a flag to indicate if SI units should be used or not
  • Take an optional average function to allow users to customise how the average is calculated
  • Add some helper information to charts to indicate that SI units are being used (if they are)

Additional questions

  • Do we need to update docs for charts being used in the gitlab project to indicate where SI units are / are not being used?