Skip to main content
100%

Rectangles using data Color

✓ Published0🌍 Public
IIgathi
Last edited Jul 16, 2018
Created on Jul 15, 2018

This example shows a set of seven colored rectangles, each labeled with a name, positioned at fixed coordinates on an SVG canvas. The rectangles are bound to an array of data objects containing x/y positions, dimensions, and color values. The code uses D3 v4’s `selectAll` and `data` binding to create and style each rectangle, then appends text labels next to them. The data comes from an inline JSON array, and the visualization uses SVG for rendering, with colors specified as hex and RGB strings.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/Igathi/'>Igathi</a>'s block: <a href='http://bl.ocks.org/Igathi/713b5a2deed36e1f2a153d7a303d8279'>Rectangles using data</a>

mit Licensed

Similar vizzes