🌍 Public
Customising axes with D3.js!
This example shows a horizontal bar chart of the ten happiest countries ranked by their happiness scores. The visualization highlights custom axis styling, where tick marks and lines are recolored, and axis domains are removed for a cleaner look. Built with D3.js v5, it loads data from a CSV file and uses `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. The code also leverages `axisLeft` and `axisBottom` to generate axes, with SVG rectangles representing each bar.
AI-generated descriptionMIT Licensed
Comments
Sign in to join the discussion.