In-Depth Axis Styling
✓ Published1🌍 Public
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 descriptionThis 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