Skip to main content
100%

line chart

✓ Published0🌍 Public
Sshreelasya.bezawada@gmail.com
Last edited Oct 27, 2025
Created on Oct 27, 2025
Forked from HTML Starter

This line chart shows the relationship between population and electricity consumption across major global cities, with each point representing a city and a smooth curve connecting them by ascending population. The visualization uses D3 v7 with SVG rendering and includes interactive hover tooltips displaying detailed city statistics. Data is loaded from a remote text file, parsed in-browser using `d3.csvParse`, then sorted and scaled with `d3.scaleLinear`. The chart applies `d3.axisBottom` and `d3.axisLeft` for axes, `d3.line` with `curveMonotoneX` for the path, and gridlines generated from the axis scales.

AI-generated description
MIT Licensed

Similar vizzes