Skip to main content
100%

D3 in depth

✓ Published0🌍 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

MIT Licensed

Similar vizzes