🌍 Public
Viewing a saved revision (read-only)
93a414f93bdd44278aafc2b42cb04ea2
From bars to scatter plot with revert x and y
This example transforms a bar chart into a scatter plot by swapping the x and y axes, displaying country populations as evenly spaced circles with a fixed radius. The visualization uses D3 v5’s `scaleLinear` for the population axis and `scalePoint` for the categorical country axis, with `axisBottom` and `axisLeft` generating gridlines. Data comes from a local CSV loaded via `d3.csv`, and circles are appended to an SVG with click handlers that log each data point to the console.
AI-generated description