Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Bar chart

Public visualization

Viewing a saved revision (read-only)

16e796e1fd834af2b75c9a668e108957

Refactored Bar chart

0 stars1🌍 Public
BbeauMarko
Last edited Feb 4, 2021
Created on Feb 4, 2021

This example shows a horizontal bar chart of the top 10 countries by population for 2020, with countries listed along the y-axis and population values along the x-axis. The visualization uses React to render SVG elements, with D3 v6 providing scales and data loading. The code imports `csv` to fetch population data from a GitHub-hosted CSV file, `scaleBand` and `scaleLinear` to map country names and population values to pixel coordinates, and `max` to determine the x-axis domain. Axis components and bar marks are defined as individual React components for modularity.

AI-generated description

A program that follows your mouse with a circle.