We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
"c"
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
According to the docs:
c - converts the integer to the corresponding unicode character before printing
In my code,
console.log(format("c")(97));
Just prints 97. I was expecting something along the lines of python:
>>> chr(97) 'a'
The text was updated successfully, but these errors were encountered:
In C, python and PHP printf("%c", 97) give "a". In
d3-format/src/formatTypes.js
Line 8 in ff87892
Sorry, something went wrong.
The code is doing what is intended here, but it looks like we forgot to update the documentation accordingly. This was changed in e247671.
I see. Is there a way to do achieve the same effect as python's chr function with d3-format?
chr
b8cdc5e
Is there a way to do achieve the same effect as python's chr function with d3-format?
Not currently, but you could use String.fromCharCode(97) in conjunction with type c.
c
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
According to the docs:
In my code,
Just prints 97.
I was expecting something along the lines of python:
The text was updated successfully, but these errors were encountered: