Skip to main content
100%

Fork of Axis Labels

✓ Published1🌍 Public
JJingxuan Yang
Last edited Feb 6, 2024
Created on Feb 6, 2024
Forked from Axis Labels

This fork demonstrates how to add labeled axes to a scatterplot-style visualization using D3 v7. It renders a gray inner rectangle as the plotting area, with a linear x-axis and y-axis scaled from 0 to 100, and places the labels “X Axis Label” and “Y Axis Label” at configurable offsets. The code uses `scaleLinear`, `axisBottom`, and `axisLeft` to create the axes, while custom functions `xAxisLabel` and `yAxisLabel` position the text elements with SVG transforms.

AI-generated description

Adding labels to our X and Y axes with D3.

MIT Licensed

Similar vizzes