Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Untitled

Public visualization

Viewing a saved revision (read-only)

7e2262cc8f834cc8961984b864ff9a5c

Untitled

0 stars0🌍 Public
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.