Skip to main content
Public

Share visualization

Loading preview…

Introduction to D3

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Introduction to D3

0
UUzoemeka Okechukwu Innocent
Last edited Aug 9, 2023
Created on Aug 9, 2023
Forked from Hello VizHub

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 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.

Comments

Sign in to join the discussion.

MIT Licensed