Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 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.

MIT Licensed

Similar vizzes