Skip to main content
Public

Share visualization

Loading preview…

Fork of Axis Labels

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Axis Labels

0
Ccoreyfnolan@gmail.com
Last edited Feb 2, 2024
Created on Feb 1, 2024
Forked from Axis Labels

This example shows a D3.js chart with labeled X and Y axes over a gray inner plot area, using a linear scale for both axes from 0 to 100. The visualization explicitly separates axis and label construction into modular functions: `axisBottom` and `axisLeft` render the tick marks, while separate `xAxisLabel` and `yAxisLabel` functions position and style text, such as rotating the Y-axis label 90 degrees. The code dynamically sizes the SVG to the container and applies configurable margins and offsets. All rendering uses D3's `join` method for declarative SVG element creation.

AI-generated description

Adding labels to our X and Y axes with D3.

Comments

Sign in to join the discussion.

MIT Licensed