🌍 Public
Viewing a saved revision (read-only)
7ee6cf60f06f4cf999076033d68028fd
Let's make a face with D3.js
This example demonstrates how to create a simple face-like pattern using D3.js by rendering five red circles across the center of an SVG canvas. The visualization uses fruit objects as the data source, with each fruit type assigned to a circle. The code leverages D3’s `select`, `range`, and `enter().append()` methods to bind data and generate circle elements, setting their `cx` positions based on index and `cy` to the vertical center. The resulting static composition highlights basic data-binding and SVG shape creation in D3 v5.
AI-generated descriptionAn example showing the capabilities of VizHub.