Skip to main content
100%

Customising axes with D3.js!

✓ Published1🌍 Public
Ssoniyaa-dv
Last edited Jul 23, 2020
Created on Jul 23, 2020

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 description
MIT Licensed

Similar vizzes