Making a Bar Chart
✓ Published15🌍 Public
A horizontal bar chart displays the goal counts of Premier League players, sorted in descending order from Mohamed Salah’s 32 to Eden Hazard’s 12. Built with D3 v5, the example loads CSV data via `d3.csv`, selects the SVG element with `d3.select`, and renders steelblue rectangles with `rect` elements. The chart uses a fixed 960×500 SVG canvas, with text labels sized via CSS, demonstrating a straightforward mapping from tabular data to visual bars.
AI-generated descriptionMIT Licensed