Skip to main content
Public

Share visualization

Loading preview…

Untitled

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

Untitled

0
SSamir Nandardhane
Last edited May 16, 2023
Created on May 16, 2023
Forked from D3 Starter

This example demonstrates how to build an interactive pie chart using D3 version 6. The chart displays the distribution of bike ride types (classic or electric) within a selected year (2021 or 2022) and user type (casual or member), with data parsed from a hardcoded CSV string via `d3.csvParse`. Users select values from two dropdown menus, triggering the `updateChart` function to filter the data and redraw the SVG using `d3.pie` and `d3.arc`, with text labels placed using `arc.centroid`.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed