block by mbostock 4323929

Axis Styling II

Full Screen

This example demonstrates the use of post-selection to customize an axis during transitions. After the axis is rendered, its elements (such as text labels, here) are reselected and modified to produce the desired appearance. When transitioning the axis, the post-selection modifies entering, updating and exiting elements. Passing null values to transition.tween cancels default tweens scheduled by the axis in favor of the customized styles.

index.html