Skip to main content
100%

tutorial

✓ Published0🌍 Public
Nnishwitha.1032@gmail.com
Last edited Nov 1, 2024
Created on Nov 1, 2024

This example shows the distribution of highway fuel efficiency across car brands as a pie chart. Each slice is labeled with the brand name and its corresponding percentage of highway MPG. The visualization loads CSV data from a GitHub repository and uses D3’s `pie` and `arc` generators to create the slices, with `scaleOrdinal` assigning colors per brand. Labels are positioned using `arcGenerator.centroid`, and the SVG is centered within the viewport.

AI-generated description

A demonstration of reusable scatter plot.

MIT Licensed

Similar vizzes