🌍 Public
Viewing a saved revision (read-only)
0f3caafc2cc1412d863edc81b2f3e77d
Olympic Gold Medals by Sports
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 descriptionAn 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: