Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Responsive Axis Labels

Public visualization

Viewing a saved revision (read-only)

4c7c6a7f56a84b408a360eb93ddf0165

Responsive Axis Labels

0 stars0🌍 Public
CCurran Kelleher
Last edited Feb 7, 2024
Created on Feb 7, 2024
Forked from Axis Labels

This example shows a scatter plot with clearly labeled axes, where the x-axis label sits below the axis and the y-axis label is rotated vertically to the left. The code uses d3's `scaleLinear` for both scales, `axisBottom` and `axisLeft` to render the ticks, and custom `text` elements for the labels. It sets explicit offsets for the labels to control their position relative to the axes.

AI-generated description

Adding labels to our X and Y axes with D3.