Fork of Making a Bar Chart
✓ Published0🌍 Public
This example shows a horizontal bar chart of population figures for ten countries, with each bar’s length proportional to its value and country names on the y-axis. The chart uses D3 v5’s `csv`, `scaleLinear`, and `scaleBand` to map the data, along with `axisLeft` and `axisBottom` for labeled scales. Bars are rendered as SVG `rect` elements, colored steelblue via CSS, with margins set around a 960×500 viewport. The data comes from a CSV file listing country and population in thousands.
AI-generated descriptionMIT Licensed