Skip to main content
Public

Share visualization

Loading preview…

Pascal's Triangle

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

Pascal's Triangle

1
MMTR
Last edited May 1, 2021
Created on Apr 2, 2021
Forked from d3 Animation

This visualization displays Pascal’s Triangle as a series of 22 rows of numerically generated values, arranged as an SVG in a stepped diagonal layout. Each row is computed from the previous one using a custom `nextRow` function that sums adjacent elements with a coefficient of 2, producing the triangle’s entries. The code uses D3 v6 data joins to append SVG groups and text elements, positioning rows vertically via `translate` transforms and columns horizontally with a fixed offset. Circles styled with red strokes are defined in CSS but not rendered in the visible output.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed