Assigment2_Question1
✓ Published0🌍 Public
This example shows a reusable pie chart that visualizes vehicle type counts, displaying four categories as colored slices with a corresponding legend. The chart is built using D3.js version 6.7.0, leveraging the `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` APIs to compute arc paths and assign colors from the `d3.schemeCategory10` palette. The SVG rendering is created with `d3.select` and `.append`, with the legend generated through additional SVG groups and rectangles. The code also references an external iris dataset URL, though the chart itself uses the inline vehicle data for its visual output.
AI-generated descriptionA demonstration of pie chart.
MIT Licensed