Skip to main content
100%

使用“D3.js”和“SVG”来制作“柱状图”

✓ Published1🌍 Public
YYi Changsheng
Last edited Sep 20, 2021
Created on Sep 20, 2021
Forked from D3 Starter

This horizontal bar chart displays population estimates for ten countries, using an SVG canvas with D3.js v7. The code loads data from a CSV file, maps population values to a linear scale, and country names to a band scale. It renders axes using `axisLeft` and `axisBottom`, then draws colored rectangles for each bar. The chart demonstrates D3 data joins, scales, and margin-based layout within a fixed 960×400 SVG viewport.

AI-generated description
MIT Licensed

Similar vizzes