Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Bar Chart

Public visualization

Viewing a saved revision (read-only)

f38dd903427d4b4d9f3bcc9d2c72e691

Refactored Bar Chart

0 stars1🌍 Public
Mmscoop16
Last edited Jul 5, 2022
Created on Jul 5, 2022

This example shows a horizontal bar chart of population data for ten countries, using the United Nations 2019 population estimates. The chart displays the bars across a linear scale, with categorical country labels on the left axis and numeric tick marks on the bottom axis. Built with React and D3 v5, the visualization uses d3.csv to load and parse the data, d3.scaleBand for the y-axis, and d3.scaleLinear for the x-axis, rendering all marks as SVG rectangles. The code separates concerns into reusable components for the axes and marks.

AI-generated description

Using React to render data about CSS named colors.