Making a Bar Chart
This example shows a simple bar chart comparing the scores of four people—Simon, Mary, Jo, and Peter—on a scale from 0 to 100. It uses d3.scaleBand and d3.scaleLinear to map data to positions, with blue SVG rectangles drawn via d3.selectAll and data joins. The chart includes custom x and y axes built with d3.axisBottom and d3.axisLeft, labeled with names and numeric ticks. Rendering uses SVG within an 800-by-400 viewBox, with margins applied around the plot area.