Axis transitions should know about tick format #911

ezyang opened this Issue Nov 19, 2012 · 1 comment


2 participants

ezyang commented Nov 19, 2012

Consider the following axis transition:

Here, we are changing not only the scale, but the tick format (imagine that you are going from a stacked chart to a normalized stack chart; object constancy helps because the bands are simply "expanding" to fill the entire chart.) It seems the animation doesn't seem to know about that, though, and it abruptly changes the formatting of zero from the original format to the new format.

Better behavior might be to detect with the tick format has changed, and interpolate the transition along with the other animation.


mbostock commented Jan 23, 2013

The automatic axis transitions do not support every possible configuration change in the axis. For example, you can't transition a change in orientation. It’s primarily intended for a change in domain or range. Transitioning the tick format would require a crossfade of the tick labels, and while possible, you can also do that crossfade yourself either using post-selection or by removing the entire axis and adding a new one with an opacity transition.

@mbostock mbostock closed this Jan 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment