Skip to main content
Public

Share visualization

Loading preview…

Pentagon

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

Pentagon

0 stars2Public
CCurran Kelleher
Last edited Oct 1, 2018
Created on Sep 6, 2018
Forked from Face in d3

This example shows a pentagon constructed from five evenly spaced points around a central hub, with thick black lines radiating outward to each vertex and connecting adjacent vertices to form the polygon’s perimeter. The code uses d3’s `select` and `range` to compute the point coordinates via trigonometric functions, then generates line elements using D3’s data join. The visualization is rendered as an SVG with a fixed 960×800 canvas, and all styling is applied through attribute setters such as `attr('stroke-width', 15)`.

AI-generated description

Inspired by a figure from chapter 5 of Tamara Munzner's excellent book "Visualization Analysis and Design". Imported from Bl.ocks.org: Pentagon.

Comments

Sign in to join the discussion.

MIT Licensed