Skip to main content
100%

Bar Chart + Axes

✓ Published0🌍 Public
Llrakla
Last edited Dec 27, 2021
Created on Dec 25, 2021

This example shows a horizontal bar chart of the top ten most populous countries, with population values scaled linearly and country names on a band scale. The SVG rendering uses d3.scaleLinear, d3.scaleBand, d3.axisLeft, and d3.axisBottom to draw axes, while CSV data is loaded via d3.csv. Bars are appended as SVG rectangles with a fixed red fill, and axis tick labels are formatted with d3.format to abbreviate numbers. Population values are multiplied by 1000 after parsing.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes