🌍 Public
Viewing a saved revision (read-only)
bf8f351d8f5741c6a5870c527d43ad07
Reusable Scatter plot - ICE 7
This example shows a reusable scatter plot of sales versus profit across 160 monthly data points, with each point colored by a constant category to demonstrate the chart’s legend. The visualization is built using D3 v7, leveraging `d3.scaleLinear` for both axes, `d3.scaleOrdinal` with `d3.schemeTableau10` for coloring, and `d3.axisBottom` and `d3.axisLeft` for gridlines. Data is loaded from a CSV file via `d3.csv`, and the chart is implemented as a configurable function with setters for x, y, color, and label accessors.
AI-generated description