Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a basic bar chart with D3.js!

Public visualization

Viewing a saved revision (read-only)

194f2c1ddfa745d4accf77599de8c270

Making a basic bar chart with D3.js!

1 star4🌍 Public
RRoman Polulekh
Last edited Dec 12, 2022
Created on Dec 5, 2022

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