Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Charts with D3

Public visualization

Viewing a saved revision (read-only)

06a969e27a104a54a5e53a80773b8797

Bar Charts with D3

0 stars0🌍 Public
AAndy Chang
Last edited Sep 30, 2022
Created on Sep 28, 2022

This example displays a horizontal bar chart ranking the populations of ten countries, from China at the top to Mexico at the bottom. The bars are rendered as SVG rectangles with a steelblue fill, and the chart includes labeled axes for both country names and population values. The visualization is built using D3 v7, employing functions such as `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to manage the scales and axes. Data is loaded from a local CSV file and parsed to numeric values before being passed to the render function.

AI-generated description

An example including some commonly used features of SVG.