Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Olympic Gold Medals by Sports

Public visualization

Viewing a saved revision (read-only)

57dff164705247899d509abfd303c6c5

Olympic Gold Medals by Sports

0 stars0🌍 Public
Yyaredmtaye@gmail.com
Last edited Sep 24, 2024
Created on Sep 24, 2024

This bar chart visualizes Olympic gold medal counts across eight sports, showing swimming and javelin with the highest totals while running and cycling have the least. The visualization uses D3.js version 7.8.5, rendering SVG rect elements via a dynamic bar chart that adapts to container dimensions. SVG is selected with `d3.select`, while axes are generated using `scaleBand` for the categorical sports on the x-axis and `scaleLinear` for medal counts on the y-axis. The code implements `axisBottom` and `axisLeft` for scalable gridlines and labels.

AI-generated description

An approximation of a line chart using D3.js!

Watch the video and study the code to learn about:

  • SVG Path Elements
  • fill, stroke, stroke-width
  • stroke-linecap, stroke-linejoin
  • Vanilla HTML SVG Paths
  • D3.line
  • AI Assist

See also:

Full Playlist: Constructing Visualizations