ICE-7(q2)
✓ Published0🌍 Public
This example visualizes the distribution of Pokémon types among the first 100 Pokémon from the PokeAPI. It fetches Pokémon data, extracts each creature’s primary type, and renders a pie chart using D3.js’s `d3.pie` and `d3.arc` functions. Each slice is labeled with the type name and count, while an interactive legend built with SVG `rect` and `text` elements identifies color associations. The chart uses `d3.rollup` for aggregation and D3’s ordinal color scale for slice coloring.
AI-generated descriptionPokémon Type Distribution
- Fetches Pokémon data from the PokeAPI
- Renders a pie chart displaying the distribution of Pokémon types
- Each slice represents a type, with the count shown in the label
- Interactive legend for easy identification of types
- Built with D3.js for data visualization
MIT Licensed