Skip to main content
100%

Fork of D3 Pie chart

✓ Published1🌍 Public
Nnishanththouta16@gmail.com
Last edited Apr 1, 2025
Created on Apr 1, 2025
Forked from D3 Starter

This pie chart displays the distribution of engine types—Petrol, Diesel, Electric, and Hybrid—within a dataset, with values expressed as percentages. It visualizes categorical proportions using a standard circular layout generated by the D3.js `d3.pie` and `d3.arc` APIs, rendered as SVG paths. Slices are filled with colors from the `d3.schemeCategory10` ordinal scale, and each slice is labeled directly on the chart. A legend, built with custom HTML elements, maps each color to its corresponding engine type and percentage value, using the same color assignment from `d3.scaleOrdinal`.

AI-generated description
MIT Licensed

Similar vizzes