Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 in depth

Public visualization

Viewing a saved revision (read-only)

4527a26482d042bebd1038090d6869f9

D3 in depth

0 stars0🌍 Public
SSubhendu Karmakar
Last edited Dec 25, 2023
Created on Dec 25, 2023
Forked from Learn D3

This example shows horizontal bar charts for the populations of five cities, with city names positioned to the right of each bar. A hover effect changes the bar color from steelblue to orange. The visualization is built with D3 v7, using selections, data binding, and the `join` method to create SVG `rect` and `text` elements. The data is hard-coded in an array of city objects, and bar widths are scaled by multiplying population values by a constant factor.

AI-generated description

Learning D3