🌍 Public
Viewing a saved revision (read-only)
ab703d8e77a14b1d8b8a49312403f335
Top India Car Sales
This pie chart visualizes the top five Indian car manufacturers by annual sales, with each slice labeled with its sales figure in thousands. The visualization loads CSV data from a GitHub gist, sorts and filters the dataset, then uses d3.pie and d3.arc to generate SVG paths for the chart. A d3.scaleOrdinal assigns distinct colors to each brand, while custom legends and text labels are positioned using arc.centroid. The code imports specific functions from d3 v5, including csv for data loading and format for tick label formatting.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.