Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar chart

Public visualization

Making a Bar chart

0 stars0🌍 Public
RRisabh Raj
Last edited Sep 16, 2021
Created on Sep 13, 2021

A horizontal bar chart displays population estimates for ten countries, with each rectangle’s height fixed at 300 pixels and width also fixed at 300 pixels, so the bars do not encode the values proportionally. The data from `data.csv` is loaded via `d3.csv`, and each population value is multiplied by 1000 in JavaScript to convert units. The chart is rendered as an SVG, using `d3.select` to target the `<svg>` element and `svg.selectAll('rect').data().enter()` to append rectangles.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed