Making a Bar Chart
✓ Published1🌍 Public
This example visualizes the top 10 countries by total merchandise export in 2017, using population data from the World Trade Organization to demonstrate a basic bar chart. The chart maps each country’s population to bar widths via a linear scale, while a band scale positions the country labels on the y-axis. Built with D3 v5, it uses `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to render an SVG with axes and steel-blue rectangles. Data is loaded from a CSV file and transformed in JavaScript before rendering.
AI-generated descriptionThis bar chart shows the Top 10 total merchandise export worldwise. The data comes from the year 2017 in World Trade Organization: Total Merchandise Export 2017.
MIT Licensed