Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart

Public visualization

Viewing a saved revision (read-only)

1730da399bb94a19b13dc4d5a476edd9

Bar Chart

0 stars0🌍 Public
NNikithakatta30
Last edited May 13, 2023
Created on May 13, 2023
Forked from Making A Bar Chart

This bar chart displays the top 10 countries by Happiness Score from the World Happiness Report data, sorted in descending order before rendering. The chart uses a linear scale for the x-axis (Happiness Score) and a band scale for the y-axis (Country names), with bars filled in steelblue. The code leverages D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, `axisBottom`, and `csv` to load and process the data, while React handles the component structure. The y-axis labels are cleaned by removing gridlines and domain paths, and the x-axis is labeled “Happiness Score.”

AI-generated description