Making a Bar Chart
This example shows a horizontal bar chart of provincial amounts from a CSV file, with each bar’s length proportional to its value. The visualization uses D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to position bars and axes. Data is loaded via `d3.csv`, converted to numbers, and rendered as SVG rectangles with a steelblue fill, using margins to offset the plotting area.