Skip to main content
Public

Share visualization

Loading preview…

Chocolate cake

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

Chocolate cake

1
Kkramyasudha2024@gmail.com
Last edited Feb 24, 2025
Created on Feb 24, 2025

A chocolate cake slice on a plate, complete with wavy frosting, a cherry, and cream swirls, sits beside a steaming cup of coffee. The SVG scene uses D3.js to construct basic shapes like polygons, ellipses, and paths, with explicit coordinate attributes. The code demonstrates direct DOM manipulation via `select` and `append`, and draws the frosting drip using `path()` with cubic Bézier curves (`bezierCurveTo`). A soft shadow ellipse and coffee steam paths add depth, all rendered within a fixed 960×500 SVG canvas.

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