Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart - Modular

Public visualization

Viewing a saved revision (read-only)

4998400e8a3f42f3a12c381f31444be3

Making a Bar Chart - Modular

0 stars1🌍 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.