Skip to main content
100%

In-Depth Axis Styling

✓ Published1🌍 Public
Aadventuresenglish.info@gmail.com
Last edited May 18, 2024
Created on Jan 30, 2024
Forked from HTML Starter

This example shows a United States GDP bar chart with a stylized y-axis label rendered as HTML inside a `foreignObject` element. The chart uses `d3.scaleTime` and `d3.scaleLinear` with `d3.axisBottom` and `d3.axisLeft`, while bars are created via `join("rect")` and formatted with `d3.format`. Data is fetched asynchronously from a Free Code Camp GitHub repository, and the SVG includes an image background, custom tooltip with mouseover/mouseout handlers, and a rotated axis title.

AI-generated description

This is one of my projects working towards the Free Code Camp Data Visualization Certificate

You can see the the use of forgein object in this project to create a stylized y axis.

MIT Licensed

Similar vizzes