Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Task-9/10 Q1

Public visualization

Task-9/10 Q1

0 stars0๐ŸŒ Public
Ttallurisaiteja96@gmail.com
Last edited Apr 18, 2024
Created on Apr 18, 2024
Forked from PROJECT

This D3.js pie chart displays the distribution of automobile makes by their average horsepower values, with each car make represented as a colored slice paired with a custom legend. The visualization loads CSV data from a GitHub repository using `d3.csv`, then applies `d3.pie()` to compute arc angles and `d3.arc()` to generate the SVG path geometries. A categorical color scale (`d3.scaleOrdinal` with `schemeCategory10`) colors each segment. The code renders the chart inside an SVG container with explicit width and height attributes, while a separate HTML div builds the legend items using dynamically generated colored circles and text labels.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed