Skip to main content
100%

Pie Chart for Car MPG data

✓ Published0🌍 Public
Sshiiva-surya
Last edited Mar 25, 2023
Created on Mar 24, 2023
Forked from Pie Chart

This pie chart visualizes the miles per gallon (MPG) for the top ten cars from a CSV dataset, sorted in descending order and loaded via `d3.csv`. Each slice represents a car, with its MPG value shown in the legend, which uses `d3.scaleOrdinal` and `schemeCategory10` for colors. The chart is rendered as an SVG, with slices drawn using `d3.arc` and layout computed by `d3.pie`. Hovering over a slice logs the MPG value to the console.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes