Line Chart with Multiple Lines
✓ Published0🌍 Public
This example shows suicide numbers across multiple countries over time, with each country represented by a colored line on a time-series chart. The visualization uses D3 v5 to load CSV data and render an SVG with scaled axes, grid lines, and a color legend. It employs D3's `scaleTime`, `scaleLinear`, and `scaleOrdinal` for scales, along with `axisBottom`, `axisLeft`, and `nest` to group data by country. The lines are sorted by their final value, and the chart is rendered entirely with SVG elements.
AI-generated descriptionMIT Licensed