activity7_question1
✓ Published0🌍 Public
This example shows the distribution of highway MPG percentages across car brands using a pie chart, with each brand's name and percentage labeled directly on its corresponding slice. It loads CSV data from a GitHub repository, parses the numeric fields, and generates the pie layout with d3.pie() while rendering arcs via d3.arc() on an SVG canvas. React components define the axes and marks for an additional bar chart, though the main visualization uses D3’s scaleOrdinal for categorical colors and joins data to path and text elements. The chart is titled and styled using inline SVG attributes and CSS classes.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed