Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

9602efae8da347d88b808996f8a179b7

Making a Bar Chart

0 stars1🌍 Public
MMike Wolfgram
Last edited Sep 9, 2019
Created on Sep 9, 2019

This example shows a horizontal bar chart of country populations using a CSV data file with population values scaled by 1,000. The visualization builds the chart with D3 v5, employing `d3.csv` for data loading, `scaleLinear` and `scaleBand` for positioning, and `axisLeft` and `axisBottom` for axes. Rectangles are appended to an SVG group and styled with steelblue fills. The rendering relies on SVG elements, with margins calculated from the chart’s dimensions to place the visualization properly.

AI-generated description