🌍 Public
Viewing a saved revision (read-only)
6780e9f9b7594b079f222fcced68c43f
Making a Bar Chart
This example shows a horizontal bar chart comparing the populations of Australian cities, with each bar’s length proportional to the city’s population. The chart is rendered as SVG using D3 v5, with data loaded from a CSV file and scaled using `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis. The bars are drawn by appending `rect` elements to the SVG, with their widths computed via the linear scale and heights from the band scale.
AI-generated description