Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Lab04_MerceEscalante Ejercicio #1

Public visualization

Viewing a saved revision (read-only)

95791f6fefc2491cb9d3c8f038bc98e6

Lab04_MerceEscalante Ejercicio #1

0 stars0🌍 Public
MMerceEscalante
Last edited May 14, 2021
Created on May 9, 2021

This example displays a simple yellow smiley face drawn with SVG shapes, centered within a 500×400 canvas. The construction uses D3 v6 selection and attribute methods to position a yellow circle for the head, two black circles for the eyes, and a red rectangle for the mouth. The code calculates all coordinates relative to the SVG’s width and height, ensuring the face remains centered. It relies on D3’s append and attr functions exclusively for creating and styling the visual elements.

AI-generated description