Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart

Public visualization

Viewing a saved revision (read-only)

ba30b932cfb7421eb921f888f314e166

Pie Chart

0 stars0🌍 Public
Rrajeswariamruthabommaraju@my.unt.edu
Last edited Nov 6, 2024
Created on Nov 6, 2024
Forked from Hi VizHub

This pie chart displays categorical data loaded from a CSV file, with slices colored by category and labeled directly on the chart. It uses D3.js APIs such as `d3.pie()`, `d3.arc()`, and `d3.scaleOrdinal` with `d3.schemeCategory10` to generate and color the SVG paths. Text labels are positioned using `arc.centroid`, and a legend is built with appended rectangles and text elements. The SVG is centered via a transform, and the chart dimensions are fixed at 500 by 500 pixels.

AI-generated description

An example showing the capabilities of VizHub.