Skip to main content
100%

Making a bar graph

✓ Published1🌍 Public
LLonwabo11
Last edited May 6, 2019
Created on May 3, 2019

This example builds a horizontal bar chart that displays population figures for ten countries, including China, India, and the United States. The visualization uses D3.js version 5 to select the SVG element and bind data from a CSV file, rendering each bar’s height and label through the library’s selection and scaling methods. The chart is drawn entirely as SVG, with a clean layout and no additional styling beyond the minimal CSS reset.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes