Skip to main content
100%

Hello, D3!

✓ Published0🌍 Public
PPaulPichot
Last edited Jan 18, 2018
Created on Jan 18, 2018

The example demonstrates how to draw a set of rectangles using the D3.js library version 4.12.2, where each rectangle’s width is mapped to a value from a hardcoded JavaScript array. It renders five default SVG `<rect>` elements, then uses the `d3.selectAll('rect')` method to bind the data array to those elements. The visualization does not explicitly set the rectangle widths or heights, so the shapes remain at their default size, but the data is attached and ready for subsequent styling.

AI-generated description

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/1300016'>Hello, D3!</a>

gpl-3.0 Licensed

Similar vizzes