Navigation Menu

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

transition.textTween #91

Closed
mbostock opened this issue Mar 22, 2019 · 3 comments
Closed

transition.textTween #91

mbostock opened this issue Mar 22, 2019 · 3 comments

Comments

@mbostock
Copy link
Member

It would be nice to support this out of the box. I think we’d want to use different logic than d3.interpolateString, though, because that doesn’t work very well with localized numbers.

@mbostock
Copy link
Member Author

If we also supported transition.textTween (and we should) you could always specify a custom interpolator.

@mbostock mbostock changed the title transition.text transition.textTween Mar 24, 2019
@mbostock
Copy link
Member Author

Adding transition.textTween seems easy and backwards-compatible. For generic transition.text, we should keep the current behavior both for backwards-compatibility and because parsing localized numbers is a hard problem. I think we can sidestep the parsing problem by better supporting data interpolation: then the author only needs to specify how to format, and not how to parse.

@mbostock
Copy link
Member Author

Added in ac4e423.

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

1 participant