🌍 Public
Viewing a saved revision (read-only)
6191127ad56742fc9e335d9256a98751
Melting Data for Multiple Lines
This example visualizes population trends for countries over time as multiple smoothed lines, using a nested data structure to group values by region. The chart displays yearly population estimates from the UN’s medium variant dataset, covering 1950 to 2100. Built with React and D3 v5, the code employs `d3.nest` for data grouping, `d3.line` with `curveBasis` for path generation, and `d3.scaleOrdinal` with `schemeCategory10` for color mapping. A custom color legend and axes with tick formatting complete the SVG rendering.
AI-generated descriptionAn example showing the one week Temperature from San Francisco. The data comes form here