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.text is not tween #2557

Closed
ming-codes opened this issue Sep 15, 2015 · 1 comment
Closed

transition.text is not tween #2557

ming-codes opened this issue Sep 15, 2015 · 1 comment

Comments

@ming-codes
Copy link

Looking at the source shows this seems to be on purpose.

Any particular reason for this?

@mbostock mbostock added the req label Oct 21, 2015
@mbostock mbostock added this to the Icebox milestone Oct 21, 2015
@mbostock
Copy link
Member

Generally speaking, it’s because it’s not possible to smoothly transition displayed text, and doing so by default would be distracting. You can interpolate the numbers in the text, but that’s not perceived as a smooth transition in the same way as interpolating position or color is. So, D3 simply replaces the text at the start of the transition.

You can still interpolate text using transition.tween, if you want.

@mbostock mbostock removed the req label Oct 21, 2015
@mbostock mbostock removed this from the Icebox milestone Oct 21, 2015
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