Skip to main content
100%

Making a Bar chart

✓ Published2🌍 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
MIT Licensed

Similar vizzes