Skip to main content
100%

Making a Bar Chart - Modular

✓ Published1🌍 Public
Eegrebing
Last edited Sep 20, 2020
Created on Sep 20, 2020
Forked from Making a Bar Chart

A horizontal bar chart ranks the ten most populous countries, using CSV data for country names and population figures. The example demonstrates a modular build process, separating the chart's core logic from reusable components. It uses D3 version 6 APIs including `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct the scales and axes. SVG elements are appended and configured within a translated group, with custom tick formatting that converts values to billions. Axis labels and a main title are added, while CSS styles control the visual appearance of bars, ticks, and text elements.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes