Skip to main content
100%

Refactoring a Bar Chart

✓ Published1🌍 Public
NNikhil Reddy Manda
Last edited May 13, 2021
Created on May 13, 2021
Forked from Margins and Axes

This example shows a horizontal bar chart ranking the populations of the top 10 countries from a UN population dataset, loaded via `d3.csv` and rendered with React components. The chart uses `d3.scaleBand` for the categorical y-axis, `d3.scaleLinear` for the quantitative x-axis, and SVG `<rect>` elements for the bars. Axis labels and ticks are generated by custom React components that map over the scales’ domain and tick values.

AI-generated description

Refactoring a Bar Chart

MIT Licensed

Similar vizzes