Making a Bar Chart (Outtake)
✓ Published0🌍 Public
This example displays a bar chart of each continent's 2018 population, sourced from Wikipedia, with values rendered as horizontal bars. The visualization uses D3 v5’s `scaleLinear` and `scaleBand` to map population counts to bar widths and continent names to vertical positions, while `format` adds comma separators. The SVG output includes text labels for each continent and its population, with bars styled via the `select` and `append` API.
AI-generated descriptionThis bar chart shows the population of each continent. The data comes from Wikipedia: List of continents by population.
MIT Licensed