My Task 9
✓ Published0🌍 Public
This example presents a pie chart visualizing car purchase percentages by brand, with a legend and axis labels. It loads a CSV dataset from a GitHub gist, and uses D3 v7 APIs including `d3.csv`, `d3.pie`, `d3.arc`, `d3.scaleOrdinal`, and `d3.schemeCategory10` to compute and render the arcs. The SVG chart is created in a container with a separate legend, and each slice includes a tooltip title showing the brand and percentage. The data is drawn directly from the remote CSV file, while the layout is fixed with explicit width and height margins.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed