-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[formats] add better defaults for time + number formatting #4843
[formats] add better defaults for time + number formatting #4843
Conversation
69f6d94
to
ee3cdf9
Compare
Codecov Report
@@ Coverage Diff @@
## master #4843 +/- ##
=======================================
Coverage 76.96% 76.96%
=======================================
Files 44 44
Lines 8534 8534
=======================================
Hits 6568 6568
Misses 1966 1966 Continue to review full report at Codecov.
|
it looks like the verbose format is not always being used in the tooltip, will fix this / if you have tips ( ;) ) let me know |
It would be nice to add quarters -Q1, Q2, Q3, Q4 |
@oxydash while I agree that'd be nice, it's not trivial:
|
Looks good, this should fix a lot of axis label problems. |
* [formats] add better defaults for time + number formatting * [formatDate] add tests for concise formatDate * [nvd3] use verbose time format in tooltips * [number format] improve number format description * [formats] revert to .3s defaults, tweak number format preview * [formats] default number vis to .3s
* [formats] add better defaults for time + number formatting * [formatDate] add tests for concise formatDate * [nvd3] use verbose time format in tooltips * [number format] improve number format description * [formats] revert to .3s defaults, tweak number format preview * [formats] default number vis to .3s
* [formats] add better defaults for time + number formatting * [formatDate] add tests for concise formatDate * [nvd3] use verbose time format in tooltips * [number format] improve number format description * [formats] revert to .3s defaults, tweak number format preview * [formats] default number vis to .3s
This PR is all about making better default for time + number formatting 🚀 It adds:
a more concise multi-format tick formatter. Here is the before and after (and you can play with it in this observable notebook):
sets most default number formats to 1 decimal place instead of 3
reduces the number of y-axis ticks (to ~5), there is no need for ~10+ that nvd3 sets by default
rich tooltip => false by default, this makes tooltips look pretty bad, you can still hover over individual lines to see their values, or toggle on rich tooltips if you want them.
@mistercrunch @hughhhh @john-bodley @graceguo-supercat @michellethomas @fabianmenges