🌍 Public
Making a Bar Chart
This bar chart displays the Top 10 countries by total merchandise export in US dollars (millions) for 2017, sourced from the World Trade Organization. It renders each country as a horizontal green rectangle, with the length proportional to its export value. The code uses D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to position and label the bars within an SVG. Data is loaded from a CSV file and parsed into numeric values before rendering.
AI-generated descriptionThis bar chart shows the Top 10 total merchandiseexport in US dollar at current prices (Millions) worldwise. The data comes from the year 2017 in World Trade Organization: Total Merchandise Export 2017.
MIT Licensed
Comments
Sign in to join the discussion.