All examples By author By category About

mbostock

Left-Aligned Ticks

This example demonstrates how to create left-aligned axis labels using post-selection. First, the scale’s domain and range are extended by one month on either end to create additional space for the first and last tick. Then, after the axis is rendered, the text label elements are selected, and then attributes on the elements are modified to customize the label appearance.