Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar chart

Public visualization

Making a Bar chart

0 stars2🌍 Public
Ddev-snip
Last edited Aug 19, 2019
Created on Aug 18, 2019
Forked from Making a Bar chart

This example shows a horizontal bar chart ranking the populations of ten countries, with bars sized proportionally to each nation’s population values loaded from a CSV file. The visualization uses D3 v5’s `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisLeft` and `axisBottom` to render the axes. SVG rectangles are appended and positioned using the scales, with the chart drawn inside a bordered margin area. The data is parsed and multiplied by 1,000 to reflect actual population figures.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed