Closed sophiamersmann closed 3 months ago
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @sophiamersmann and the rest of your teammates on Graphite
Quick links (staging server): Site | Admin | Wizard |
---|
Login: ssh owid@staging-site-add-rounding-mode
Edited: 2024-06-14 08:56:02 UTC Execution time: 1.16 seconds
Thank you for the review! Being able to type 1_000_000
is neat 🙌🏻
Adds support for rounding to significant numbers, resolves https://github.com/owid/owid-grapher/issues/1851
Summary
variable.display.roundingMode
andvariable.display.numSignificantFigures
roundingMode
is one ofdecimalPlaces
orsignificantFigures
(withdecimalPlaces
being the default)roundingMode
isdecimalPlaces
, we look atnumDecimalPlaces
; if theroundingMode
issignificantFigures
, we look atnumSignificantFigures
r
mode ("decimal notation, rounded to significant digits"); when rounding to sig figs, trailing zeroes are always shownDetails
scatterPointLabelStrategy
is set tox
ory
)numDecimalPlaces
is respected here)Caveats
Testing
To do
variable.display.roundingMode
andvariable.display.numSignificantFigures