Rotated Axis Labels
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Dec 29, 2012
A date scale spans a full year, from January 2012 to January 2013, with axis ticks rendered by d3.svg.axis. The example shows how to rotate the tick label text by 90 degrees using post-selection, where after the axis is drawn, the `.selectAll("text")` method retrieves the labels and adjusts their `x`, `y`, `dy`, and `text-anchor` attributes for a custom appearance. The axis is drawn with SVG line and path elements.
AI-generated descriptionThis example demonstrates how to rotate axis labels by 90° using post-selection. After the axis is rendered, the text label elements are selected, and then attributes on the elements are modified to customize the label appearance.
gpl-3.0 Licensed