Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Refactored Bar Chart

Public visualization

Refactored Bar Chart

0 stars1๐ŸŒ Public
KK3zter
Last edited Dec 17, 2021
Created on Dec 17, 2021

This visualization presents a horizontal bar chart displaying the populations of ten countries from a UN dataset loaded via `d3.csv`. React state management with `useState` and `useEffect` handles asynchronous data loading, while D3 scales (`scaleBand` and `scaleLinear`) map country names and population values to SVG coordinates. The chart is rendered as SVG elements through reusable React components for axes and marks, with axis ticks generated directly from D3 scale methods.

AI-generated description

Loads in some data using D3 and uses react state to track the data

Comments

Sign in to join the discussion.

MIT Licensed