Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Axis Labels

Public visualization

Viewing a saved revision (read-only)

5f5e55d33a9a4a32b391a67ddfae0a43

Fork of Axis Labels

0 stars0🌍 Public
Ssamozarif@gmail.com
Last edited Sep 18, 2024
Created on Sep 18, 2024
Forked from Axis Labels

This example demonstrates how to add descriptive labels to the X and Y axes of a chart using the D3.js library (version 7.8.5). It shows a scatter plot with labeled axes, where the X-axis label is positioned below the axis and the Y-axis label is rotated 90 degrees and placed to the left. The implementation uses D3’s `scaleLinear`, `axisBottom`, and `axisLeft` functions to create scales and axes, while custom text elements handle the label placement and styling.

AI-generated description

Adding labels to our X and Y axes with D3.