DONUT CHART
✓ Published0🌍 Public
This donut chart visualizes the distribution of orders by state, offering interactive tooltips for state-specific counts and a color-coded legend. It loads data from a remote CSV file, grouping rows by state using d3.rollup. The visualization uses d3.pie and d3.arc to generate SVG path slices, with mouseover and mouseout events to control an HTML tooltip. A d3.scaleOrdinal with the schemeCategory10 palette assigns colors, while d3.csv with d3.autoType handles data parsing, and the legend is constructed with SVG rect and text elements.
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.
MIT Licensed