-
Notifications
You must be signed in to change notification settings - Fork 286
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
Ticks around binary prefixes? #177
Comments
d3.ticks (which is the basis of most scale.ticks implementations) is based on powers of ten, so I’m not sure if there’s a clean way to change the tick generation strategy. Though of course you can pass whatever values you want I axis.tickValues. Presumably the first thing we’d want is a standalone implementation of tick generation, in the style of d3.ticks but for binary prefix values. That work would happen in d3-array. Maybe call it d3.ticksBinary? |
(It might be possible for scale.ticks to parse the tick format specifier, if it’s a string, and look for the |
Opened issue to add |
When I’m plotting bits (or more likely bytes) it would be nice if I could arrange the ticks on the round binary prefix values, e.g.
["0.5 GiB", "1.0 GiB", "1.5 GiB", "2.0 GiB"]
rather then on the SI prefix values.This will be especially nice if d3/d3-format#33 goes through since
.tickFormat(".2B")
(whereB
indicated binary prefix) would create really ugly ticks.The text was updated successfully, but these errors were encountered: