Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 textbook

Public visualization

D3 textbook

0 stars0🌍 Public
Ppinlin0816157
Last edited Sep 27, 2022
Created on Sep 27, 2022

This example shows a simple SVG face built from two circles with a black border and eye, rendered on a yellow background. It demonstrates basic D3 v7 selection and attribute-setting methods, using `select` on the existing SVG element and appending circle shapes with explicit `cx`, `cy`, `r`, `fill`, and `stroke` attributes. The code reads the SVG’s height and width attributes to position the shapes relative to the viewport center. The visualization relies entirely on static SVG markup created programmatically, with no data binding or interactive behavior.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed