Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Create a face with d3.js!

Public visualization

Viewing a saved revision (read-only)

d425f716334841b3932e03cef62f494a

Fork of Create a face with d3.js!

0 stars0🌍 Public
AArun
Last edited Feb 28, 2024
Created on Feb 28, 2024

This example draws a stylized face in SVG using D3.js, rendering a yellow circular head with eyes, eyebrows, and a mouth. The code calculates positions and sizes from the SVG dimensions and uses D3’s `arc` function to create a mouth based on inner and outer radii and start and end angles. A continuous animation moves the eyebrows up and down via chained `transition()` calls with specified durations and transforms. The visualization demonstrates D3’s selection, appending, and transition APIs within an SVG canvas.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.