Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

task 9_q1

Public visualization

Viewing a saved revision (read-only)

03eb7e6481824dcfa57a94a818908cbe

task 9_q1

0 stars0🌍 Public
Sshivasaiamaravadi@gmail.com
Last edited Apr 21, 2024
Created on Apr 21, 2024
Forked from Hello VizHub

This example is a pie chart showing the age distribution of a population, with each slice labeled by its age bracket. The chart is rendered as an SVG using D3.js v3, drawing colored arcs for each category. The visualization uses the `d3.svg.arc` generator to define slice geometry and `d3.layout.pie` to compute the angles, while the `color` scale assigns each age group its palette color. Data is loaded from a CSV file and preprocessed by converting the population values to integers. The slices have a white stroke, and labels are positioned at each arc's centroid.

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.