Skip to main content
Public

Share visualization

Loading preview…

Circles with Canvas

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Circles with Canvas

0
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

A variant of circles with D3 that uses Canvas instead of SVG for rendering. Accommodates hi-dpi displays!

Comments

Sign in to join the discussion.

MIT Licensed