Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

question1act7

Public visualization

Viewing a saved revision (read-only)

ff1645c04b59478cb61f713353d292b7

question1act7

0 stars0🌍 Public
Ggalijawaharnath@gmail.com
Last edited Nov 6, 2024
Created on Nov 6, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.