🌍 Public
Viewing a saved revision (read-only)
ff1645c04b59478cb61f713353d292b7
question1act7
This example shows the distribution of Olympic medals by country using a pie chart, where each slice represents a country’s total medal count (Gold, Silver, and Bronze). The visualization uses d3.pie and d3.arc to compute and draw the chart, with d3.scaleOrdinal and d3.schemeCategory10 assigning distinct colors to each segment. A legend is appended using SVG rectangles and text, while the data is fetched from a CSV URL via d3.csv. The SVG canvas is 960 by 500 pixels, and the chart is centered within it.
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.