🌍 Public
Viewing a saved revision (read-only)
200903e8273948f099fc933c07534092
ass2q1
This example renders a pie chart of automotive product sales data for April 2024, sourced from a CSV file via GitHub Gist. Each slice represents an item category, with its total sales value labeled directly on the chart and repeated in a legend. The visualization uses D3 v5’s `pie` and `arc` generators to compute and draw the slices, while `scaleOrdinal` assigns colors and `format` styles the numeric labels. The SVG output is generated within an HTML page, styled with custom CSS for the legend and text.
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.