Fork of d3 and canvas - the bind, the draw and the pick
✓ Published0🌍 Public
Yyar
Last edited Jun 3, 2022
Created on Jun 3, 2022
Forked from d3 and canvas - the bind, the draw and the pick
This example shows an interactive canvas visualization of 5,000 colored grid cells, where users can adjust the number of cells via a text input and hover to see a tooltip with the cell’s value. It uses D3 v4 for data binding and scales, while rendering both a visible canvas and a hidden canvas for color-based picking—mapping each cell to a unique RGB color via `getImageData` to identify hovered elements. The demo includes a timer-driven animation that redraws the grid over 300 milliseconds.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed