Canvas Scatterplot
✓ Published0🌍 Public
JJverma
Last edited May 18, 2017
Created on May 18, 2017
This example renders 20,000 randomly generated points as a Canvas scatterplot, with x, y, and radius values sampled from normal distributions. It demonstrates a color-picking technique for interaction: a hidden canvas draws each point in a unique RGB color, and the visible canvas draws them in steelblue. On mousemove, the code calls Canvas `getImageData` on the hidden canvas to identify the point under the cursor, then displays a tooltip with its coordinates and radius. It uses d3.scaleLinear for axes and d3.timer for a brief animation loop.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed