Making a Bar Chart
✓ Published1🌍 Public
This example shows a horizontal bar chart of the top 10 most populous countries, with population values on the x-axis and country names on the y-axis. It uses D3 v6’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` APIs within a React-free SVG rendering. The data is loaded from a CSV file and parsed by multiplying the population column by 1000. Grid lines are drawn via tick size customization, and the left axis’s domain and tick lines are removed for a cleaner look.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed