🌍 Public
Viewing a saved revision (read-only)
194f2c1ddfa745d4accf77599de8c270
Making a basic bar chart with D3.js!
This example shows a horizontal bar chart ranking seven countries by count, with purple bars, light gray gridlines, and labeled axes. The data loads from a CSV file and multiplies each count by 1,000 before sorting countries in descending order. Rendering uses SVG elements created with D3 v7, employing `scaleLinear` for the x-axis, `scaleBand` for the y-axis, and `axisLeft`/`axisBottom` for ticks. A custom axis label and title are added via appended text elements.
AI-generated description