Making a Bar Chart
✓ Published0🌍 Public
This example displays a horizontal bar chart ranking the top 10 countries by total merchandise exports in 2017, using data from the World Trade Organization. The bars are rendered in SVG, with a green fill, and the chart uses d3.csv to load the data, d3.scaleLinear for the value axis, and d3.scaleBand for country categories. Axes are generated with d3.axisLeft and d3.axisBottom. The numeric export values are multiplied by 1000 during preprocessing.
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