๐ Public
Task-9/10 Q1
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 descriptionMIT Licensed
Comments
Sign in to join the discussion.