Skip to main content
100%

Assignment 2 Question 1

✓ Published0🌍 Public
Aakshayareddy224@gmail.com
Last edited Jul 9, 2024
Created on Jul 8, 2024
Forked from Hello VizHub

This example shows the distribution of employees across different units as a pie chart, with percentage labels on each slice and a color-coded legend. It loads salary prediction data from a GitHub-hosted CSV file using d3.csv, then aggregates the data with d3.rollup to count observations per unit. The visualization uses d3.pie and d3.arc to generate the chart, d3.scaleOrdinal with d3.schemeCategory10 for coloring, and renders to SVG. The chart is centered via an SVG transform, with a title and legend positioned around the main graphic.

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.
MIT Licensed

Similar vizzes