🌍 Public
Viewing a saved revision (read-only)
ac3134fa23c34dc18cc74c5529f3dbd2
Firoze_pchart
This example shows the distribution of Formula 1 car brands as a pie chart, with each slice labeled by its percentage of the total. The chart uses a categorical color scale and includes a legend, title, and axis labels. Built with D3 v6, it loads CSV data, applies the d3.pie and d3.arc generators to compute and draw the arcs, and uses d3.scaleOrdinal with schemeCategory10 for coloring. Percentage labels are positioned using arcGenerator.centroid, with SVG rendering throughout.
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.