Skip to main content
100%

自定义坐标轴

✓ Published1🌍 Public
Lluojiandan
Last edited Apr 18, 2020
Created on Apr 18, 2020
Forked from 柱状图

This bar chart displays the 2019 population of global regions, with a custom y-axis and a horizontal bar layout. The chart uses D3 v5’s `scaleBand` and `scaleLinear` to map regions and population values, while `axisBottom` and `axisLeft` render the axes. Population labels are formatted with the `format` function, replacing "G" with "B" for billions. The data is loaded from an external CSV file, and the visualization is rendered as SVG elements, with gridlines and a title styled via CSS.

AI-generated description

柱状图测试,引用数据来源于各州2019的人口数据

format参考资料: [http://bl.ocks.org/zanarmstrong/05c1e95bf7aa16c4768e]

MIT Licensed

Similar vizzes