Skip to main content
100%

KH makes a barchart with D3.js

✓ Published1🌍 Public
KKyleHincz
Last edited Aug 27, 2021
Created on Aug 26, 2021

This is a horizontal bar chart made with D3.js (version 7) and rendered as an SVG, showing the populations of ten countries (in thousands) from a local CSV file. The view uses `scaleLinear` for the x-axis and `scaleBand` for the y-axis, with populations read from the data and multiplied by 1,000 before being drawn as rectangles. Axes are added with `axisLeft` and `axisBottom`, and the chart is built by appending a group element and then entering rectangles, all styled with a steelblue fill.

AI-generated description
MIT Licensed

Similar vizzes