Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customising axes with D3.js!

Public visualization

Viewing a saved revision (read-only)

bbbd1b7498ec4144b834d6d4a947f6f9

Customising axes with D3.js!

0 stars1🌍 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