-
Notifications
You must be signed in to change notification settings - Fork 605
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
Extend labelsKMB for milli, micro, nano #994
Comments
Yes, please! 0.1m is just wrong as in the example, 1000 is So, ideally, you’d have these:
But a “legacy” mode for 2ˣ-based units in which they use K/M/G/T/P/E/Z/Y would be acceptable as option, and this is the only place where an upper-case K is okay. The demo also shows Q, whatever that is supposed to be, it’s not a præfix. |
I think mirabilos/dygraphs@6d28d02...mirabilos:dygraphs:pr-units should do it, but I need to learn how to build and unit-test this first, then adapt the tests. (I’m an experienced developer, but more on the assembly/C level and playing with js for this library here.) I also found that labelsKMG2 does weird things for “small” values (like milli), which danvk already noted, but in addition probably 10-based instead of 2-based. This is fixed. I made using both options together activate the “legacy/deprecated” mode with K/M/G… for 1024-based and even using m/µ/n… there (the normal labelsKMG2 after this patch honours IEC 60027-2 and therefore has no “small” præficēs). Comments? |
The option "labelsKMB" in dygraphs 2.1.0 allows automatic labeling with kilo, mega and giga prefixes.
It would be great if that could be extended to milli (m), micro (µ) and nano (n).
Or is there maybe another option that allows this already?
By the way: the right unit prefix for kilo would be a lower case k (https://en.wikipedia.org/wiki/Unit_prefix).
The text was updated successfully, but these errors were encountered: