🌍 Public
Viewing a saved revision (read-only)
81d1e22253264c6fb3de451b0bddfe2b
Line Chart with Multiple Lines
This example displays CO2 emissions by country, plotting profit against sub-category over time, with each region represented by a distinct colored line. The visualization uses D3 v5 within a Vue framework, rendering to SVG. It employs `d3.line` with `curveBasis`, `d3.nest` to group data by region, and `d3.scaleOrdinal` with `schemeCategory10` for coloring. Axis labels and legends are added via `d3.axisLeft`, `d3.axisBottom`, and a custom `colorLegend` function, based on sample data from annualco2.csv.
AI-generated description