Fork of Axis Labels
✓ Published0🌍 Public
This example demonstrates how to add labeled axes to a D3 visualization. It renders a gray inner rectangle with a linear x-scale and y-scale, then uses D3’s `axisBottom` and `axisLeft` to draw the axes. The x-axis label is centered horizontally, while the y-axis label is rotated -90 degrees and positioned along the left edge. The code relies on D3 v7 APIs such as `scaleLinear`, `select`, `join`, and `axisBottom`/`axisLeft`, with modular functions for each axis and label component.
AI-generated descriptionAdding labels to our X and Y axes with D3.
MIT Licensed