Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

CSV-based Bar Chart with D3.js!

Public visualization

CSV-based Bar Chart with D3.js!

0 stars1🌍 Public
Fframptonb
Last edited Feb 14, 2023
Created on Feb 11, 2023

This example shows a horizontal bar chart of population data for ten countries, loaded from a CSV file and rendered as SVG. The visualization uses D3.js v5 methods including `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to map country names to y-axis bands and population values to bar widths. Bars are appended as `rect` elements, styled with steelblue fill, and the chart includes margins and axes to frame the data.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by producing a bar chart from data within a csv file. (based on forked code from Curran Kelleher)

Comments

Sign in to join the discussion.

MIT Licensed