🌍 Public
Fork of Hello VizHub
This example presents a pie chart of engine efficiency across various vehicle types. The D3.js code builds the visualization using the `pie` and `arc` generators, rendering SVG paths for each slice and a legend with colored boxes and formatted text labels. The chart's data is hardcoded within the script, and colors are assigned via `scaleOrdinal` with the `schemeCategory10` palette. The final visualization includes a title and a legend positioned to the right of the pie.
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
Comments
Sign in to join the discussion.