Bar Chart Practice
✓ Published1🌍 Public
This example displays a horizontal bar chart of national populations using data from a CSV file, rendered as SVG rectangles. The code leverages D3 v5 APIs including `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to map population values to bar widths and country names to row positions. Population numbers are multiplied by 1000 to reflect actual figures. The chart is styled with steelblue bars and a left margin that accommodates country labels.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed