Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored bar Chart

Public visualization

Refactored bar Chart

0 stars1🌍 Public
SShmuel Leider
Last edited Jun 3, 2021
Created on Jun 3, 2021

This data visualization example shows a horizontal bar chart displaying the populations of the ten most populous countries, using data from the UN Population 2019 CSV file. The chart is constructed using React components to render SVG elements, with D3 utilities (d3.csv, scaleBand, scaleLinear, max) handling data loading and scales. The code separates concerns into distinct functional components—AxisBottom, AxisLeft, and Marks—each receiving scale and data props. The axes and rectangles are rendered as SVG elements based on the population values from the "2020" column.

AI-generated description

A program that loads and parses csv data about CSS named colred using D3 utilities, and uses React render the data.

Comments

Sign in to join the discussion.

MIT Licensed