Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

d3 and canvas - the bind, the draw and the pick

Public visualization

Viewing a saved revision (read-only)

6c535d6c02c94ba88e8da61c0046d3e5

d3 and canvas - the bind, the draw and the pick

0 stars3🌍 Public
Llars verspohl
Last edited Sep 29, 2026
Created on Apr 11, 2022
Forked from HTML Starter

This example demonstrates how d3 and Canvas can work together for interactive visualization, showing 5,000 colored grid cells arranged in a 10x10 group layout. The code uses d3.v4 to bind data to custom DOM elements, applying sequential color scales with d3.interpolateSpectral. Rendering happens through a main canvas while a hidden canvas uses unique generated RGB colors and a color-to-node map for picking interactions. A tooltip appears on hover, and d3.timer animates cell widths during transitions, with optional React integration via VizHub.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.