🌍 Public
Fork of bar_char 2
This example visualizes the population of ten countries in 2020 using horizontal bars in an SVG rendered by React. It loads data from a CSV file via D3’s `csv` utility, parses the population column, and stores it in React state. A D3 `scaleBand` positions each country along the y-axis, while a `scaleLinear` maps population values to bar widths, with margins applied to the chart layout.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.
MIT Licensed
Comments
Sign in to join the discussion.