Multiline chart with interaction
✓ Published0🌍 Public
This example shows how South American countries’ annual changes in forest area have evolved over time, with each country represented as a distinct colored line. The chart uses React with d3.v5, rendering an SVG multiline chart with a time-scaled x-axis and linear y-axis. The code uses d3.line and d3.nest to structure the CSV data by entity, d3.scaleOrdinal and d3.schemeCategory10 for colors, and adds reactive tooltips via mouseover, mousemove, and mouseleave events on each path. The visualization includes a legend and title, with data loaded from a GitHub gist.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed