Viewing a saved revision (read-only)
7f0cb74c0f7d459a8750a7577c923c55
Fork of Let's make a boba tea
This example displays a stylized boba tea cup with a green lid, a red straw, black tapioca pearls, and semi-transparent ice cubes, all rendered as static SVG shapes. The code builds the visualization by appending D3-selected SVG elements—rectangles, ellipses, and circles—positioned relative to a centered group. It uses d3.select, .append, and .attr to set coordinates and styles, with random placement for the boba and ice cubes to distribute them within the cup. The visualization demonstrates basic SVG drawing techniques with D3 v5, relying on hardcoded dimensions and no external data source.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.