Skip to main content
100%

Making a bar chart

✓ Published1🌍 Public
ZZhengyan Yu
Last edited Apr 7, 2020
Created on Apr 1, 2020

A horizontal bar chart displays population figures for ten countries, with a steelblue bar for each nation. The example demonstrates a basic D3 data join, using `scaleLinear` for the x-axis and `scaleBand` for the y-axis, with `axisLeft` and `axisBottom` to render the scales. Data loads from a CSV file via `d3.csv`, and the code converts population values to numeric form before rendering the SVG. The chart is built with D3 v5, using a simple selection to append rectangles.

AI-generated description
MIT Licensed

Similar vizzes