Skip to main content
Public

Share visualization

Loading preview…

Donut Platter

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

Donut Platter

4
Nnagasuryaharsha999@gmail.com
Last edited Feb 23, 2025
Created on Feb 23, 2025

This example renders a decorative donut on a plate using D3.js. The visualization layers concentric SVG circles to form a gray plate, a brown donut base, and a matching hole, then adds a pink frosting arc via a custom path. A loop generates 50 randomly positioned and rotated colored rectangles as sprinkles, while eight white lines with rounded caps represent a drizzle pattern. The code uses D3’s `select` and `append` functions to build the SVG scene, with manual coordinate calculations for placement.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

Comments

Sign in to join the discussion.

MIT Licensed