Skip to main content
100%

Fork of D3 Starter - line chart

✓ Published0🌍 Public
Ssowjanya
Last edited Oct 25, 2025
Created on Oct 25, 2025

This line chart visualizes the relationship between horsepower and miles per gallon (MPG) for a dataset of cars, revealing the general trend of decreasing fuel efficiency as engine power increases. Sorted by horsepower, the data is plotted as a single smooth line using D3's `d3.line` generator, with scales defined by `d3.scaleLinear` and axes rendered via `d3.axisBottom` and `d3.axisLeft`. The CSV data is loaded asynchronously from a GitHub repository and drawn as an SVG within a styled container. The chart includes labeled axes for horsepower and MPG, with the line styled in a teal color.

AI-generated description
MIT Licensed

Similar vizzes