We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
g
Is there a to specify at how many decimal places type g switches from decimal to exponential?
I'd like to format everything with more than 3 decimal places as exponential:
expect(d3.format('.3~g')(0.1)).toBe('0.1') expect(d3.format('.3~g')(0.01)).toBe('0.01') expect(d3.format('.3~g')(-0.001)).toBe('-0.001') expect(d3.format('.3~g')(-0.0001)).toBe('−1e-4') // actual: −0.0001 expect(d3.format('.3~g')(-0.00001)).toBe('−1e-5') // actual: −0.00001
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there a to specify at how many decimal places type
g
switches from decimal to exponential?I'd like to format everything with more than 3 decimal places as exponential:
The text was updated successfully, but these errors were encountered: