Skip to content
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

Use B instead of G? #94

Closed
curran opened this issue Jun 18, 2020 · 2 comments
Closed

Use B instead of G? #94

curran opened this issue Jun 18, 2020 · 2 comments

Comments

@curran
Copy link

curran commented Jun 18, 2020

One of the most common pieces of feedback I get from clients for visualizations that use the SI format is "What does G mean?" and "Why doesn't is use B for Billions?".

It's easy enough to do string replacement with something like this:

const yAxisTickFormat = number =>
  format('.1s')(number)
    .replace('G', 'B');

However, as I find myself doing this over and over in different projects, I wonder if it might be a sensible thing to build into d3-format. I thought I'd open this issue as a place to discuss ways to approach this.

Anyone else run into this issue?

Related: #71

@mbostock
Copy link
Member

Changing this wouldn’t be backwards-compatible, and also muddies the feature definition, which is very clearly defined to used SI prefixes. The way for this feature to proceed is a new format directive (something other than s), which is covered by #71. So I’m closing this as a duplicate, but I’d welcome input on that issue!

@curran
Copy link
Author

curran commented Jun 18, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants