🌍 Public
Viewing a saved revision (read-only)
f0aa08e2fb7b4fa390563502bb736ce5
Introduction to D3
This example demonstrates basic vector graphics construction with D3 version 7, using d3.select to append SVG shapes (circle, rect, and line) to the document body within a 500×500 coordinate space. The code loads D3 from UNPKG and directly manipulates attributes such as cx, cy, r, fill, width, height, and line endpoints, though it notably contains attribute typos (e.g., `widht` instead of `width`) and redefinitions that the renderer would interpret. The visualization serves as a minimal introduction to D3’s SVG API, highlighting how to create and stylize geometric primitives without data binding or interaction.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.