You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great, thanks. Fixed the type coercion bug. Generally speaking it’s a bad idea to pass in the wrong type (and d3.format expects a number), but we should coerce to the right type, and I’ve fixed that bug in d3.formatPrefix, and by extension d3.format. Staged for 3.5.7 in #2591.
Activity
mbostock commentedon Oct 23, 2015
I can’t reproduce this issue.
Also, I’d be curious if you can reproduce this problem in the new d3-format repo, which will be the 4.0 implementation.
UlTriX commentedon Oct 23, 2015
I forgot to mention that it was d3.format("s")("0") that returned 0y
With other string values works fine. It was not supposed to work with strings?
Fix #2595 - type coercion in formatPrefix.
mbostock commentedon Oct 23, 2015
Great, thanks. Fixed the type coercion bug. Generally speaking it’s a bad idea to pass in the wrong type (and d3.format expects a number), but we should coerce to the right type, and I’ve fixed that bug in d3.formatPrefix, and by extension d3.format. Staged for 3.5.7 in #2591.