Skip to main content
Public

Share visualization

Loading preview…

starter d3 line

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

starter d3 line

0
Ggyan9427
Last edited Jul 7, 2022
Created on Jul 7, 2022
Forked from Smiley face

This example renders a simple zigzag line chart using D3’s SVG line generator, which maps each coordinate pair from a hardcoded array of alternating y-values (150 and 50) onto a polyline path. The visualization is built within a React setup, where the D3 `d3.svg.line()` API defines the x and y accessors before generating the line data. A separate React component, `Lips`, draws two quadratic Bézier curves to form a mouth-like shape, though it is not integrated into the main chart. The page uses D3 v7 and React 18 via CDN links, with no external data source.

AI-generated description

A bare minimum HTML page.

Smiley face

Comments

Sign in to join the discussion.

MIT Licensed