Skip to main content
Public

Share visualization

Loading preview…

D3 Example

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

D3 Example

0
Yyuting89830@gmail.com
Last edited Oct 22, 2023
Created on Oct 22, 2023
Forked from Hello HTML

This example shows the population distribution across five countries, broken down by religious affiliation, using a stacked bar chart. The chart is rendered with SVG via the D3.js library, utilizing the `d3.nest` and `d3.layout.stack` APIs to group and stack the data, with `d3.scale.ordinal` and `d3.scale.linear` for the axes. The data is loaded from a CSV file, and the bars are colored using `d3.scale.category10`. The chart uses a custom SI formatter to display large numbers, such as "B" for billions, on the y-axis.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed