🌍 Public
Viewing a saved revision (read-only)
9a8ab5f55b3a4f17bf1c757a512dcd28
Question2
This example shows a comparative area chart of monthly sales for two products during 2023, filled with distinct colors from a categorical scheme. The chart uses D3 v7’s `d3.scaleBand` for the month axis and `d3.scaleLinear` for the sales axis, with area paths generated via `d3.area`. Data is fetched as CSV from a GitHub repository, parsed with `d3.csvParse`, and rendered as SVG. A custom HTML legend, built with `d3.select` and `d3.selectAll`, displays color swatches and product labels alongside the chart.
AI-generated description