Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Activity 7

Public visualization

Viewing a saved revision (read-only)

06d3ade1f5ce4482ad50656e1cfaa9b2

Fork of Activity 7

0 stars2🌍 Public
Lleelakrishnadivi7@gmail.com
Last edited Nov 7, 2024
Created on Nov 7, 2024
Forked from Activity 7

This example shows the distribution of applicant incomes for approved loans using a pie chart, with each slice colored according to income level and a legend mapping loan IDs to their corresponding income values. The visualization fetches CSV data from a remote GitHub gist using `d3.csv`, then computes the pie layout with `d3.pie()` and renders SVG paths via `d3.arc()`; the color scale is built with `d3.scaleOrdinal`. The legend text is formatted with `d3.format` to display values in thousands, and the SVG canvas is selected and manipulated through `d3.select`.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.