D3 bar chart with scales & dataset
This example demonstrates a simple bar chart created with D3.js version 4, where the height of each bar represents a numeric value from the included dataset. The visualization uses SVG rectangles positioned on a 200-by-500 canvas, with bars spaced evenly along the x-axis. The code applies D3's `selectAll` and `data` binding, along with the `enter` selection to create the rectangles, setting their `width`, `height`, `x`, and `y` attributes based on the data values. The bars are outlined with black strokes, and the dataset is provided as a CSV file.