Skip to main content
Public

Share visualization

Loading preview…

Question1

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

Question1

0
Pp99vijaya@gmail.com
Last edited Nov 5, 2024
Created on Nov 5, 2024

This visualization is a donut-style pie chart that displays the distribution of five age groups (0-17, 18-34, 35-49, 50-64, and 65+) by their respective counts. The chart uses a categorical color scale from `d3.scaleOrdinal` with `d3.schemeCategory10` to differentiate each segment. The pie layout is computed using the `d3.pie` and `d3.arc` APIs, with the arcs rendered as SVG paths inside a 400x400 pixel container. A custom HTML legend, styled with flexbox, lists each age group alongside a color swatch and its count. The data is defined locally in a JavaScript array and rendered via the `d3.select` API.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed