Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Bar Chart

Public visualization

Viewing a saved revision (read-only)

c606b13713bc4418ada6ea7059886b3d

Refactored Bar Chart

0 stars1🌍 Public
MMilena Belianovich Holtman
Last edited Oct 13, 2022
Created on Oct 13, 2022

This example shows a horizontal bar chart comparing the populations of ten countries, represented as SVG rectangles encoded by length along the x-axis. The chart’s axes are composed from React components (AxisBottom, AxisLeft, Marks) that render D3 scales (scaleBand, scaleLinear) and ticks. Data is loaded asynchronously from a CSV using D3’s `csv` function and `useData` hook, while the y-axis labels use the band scale’s domain and bandwidth.

AI-generated description

A program that refactors jumbled visualization components.