Viewing a saved revision (read-only)
66583dc3cf214674a15091c93cc236c9
Fork of Responsive Scatter Plot
This example visualizes employee age against salary in a responsive scatter plot, using D3 v7’s `d3.csv` to load data from a remote CSV file and `d3.scaleLinear` to map the values. The chart draws SVG circles for each employee, with axes generated via `d3.axisBottom` and `d3.axisLeft`, and includes labeled axes for Age and Salary. The code also incorporates the `@curran/responsive-axes` library for flexible axis handling and a custom `viz` function, which applies margins, an inner rectangle background, and adjustable circle radius and opacity. The plot is rendered entirely in SVG, with a fixed initial size but structured to support responsive resizing.
AI-generated descriptionA responsive scatter plot.