Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Circles with Canvas

Public visualization

Viewing a saved revision (read-only)

4174f17b0c32479aa250d9fb590f60c3

Circles with Canvas

0 stars0🌍 Public
CCurran Kelleher
Last edited Aug 6, 2024
Created on Aug 6, 2024
Forked from Circles with D3

A set of circles in various colors and sizes appears on a pale green background, demonstrating how D3 can work with the Canvas API for high-resolution rendering. The visualization uses hardcoded data points for circle positions, radii, and fills. The code imports `select` from D3 and manually draws each circle using the Canvas `beginPath`, `arc`, and `fill` methods. It also scales the canvas context by the device pixel ratio to ensure crisp shapes on hi-dpi displays.

AI-generated description