Skip to main content
Public

Share visualization

Loading preview…

Fork of Fork of Blank Slate with Hot nice

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

Fork of Fork of Blank Slate with Hot nice

0
NNita
Last edited Mar 1, 2025
Created on Feb 28, 2025

This D3.js visualization renders a three-tiered birthday cake with distinct pastel layers, frosting scallops, candles with gradient flames, and decorative toppings like sprinkles and strawberries. The SVG is created dynamically using `d3.select().append()` to build shapes, while `d3.path()` constructs the curved frosting paths. Randomly positioned line elements generate the sprinkles, and radial gradients define the candle flames. The cake sits on an elliptical stand, with a bold text title anchoring the composition. The code explicitly sets the SVG dimensions and viewBox, with all elements drawn procedurally rather than from an external dataset.

AI-generated description

Cake Visualization

This is a D3.js visualization that renders a layered birthday cake.

Usage

  1. Include D3.js in your HTML file
  2. Run the index.js file to see the cake visualization

Features

  • Three-tiered cake with different colored layers
  • Decorative frosting details
  • Candles with flames
  • Chocolate sprinkles on the top layer
  • Strawberries on the middle layer
  • Cake stand

Comments

Sign in to join the discussion.

MIT Licensed