PieChart
✓ Published0🌍 Public
This visualization uses D3.js to display an interactive pie chart of wheat production by Indian states from 1966 to 2017. The chart aggregates production data from a CSV file, using `d3.pie()` to generate slices with an inner radius of zero, and `d3.scaleOrdinal` with `d3.schemeCategory10` for colors. Year checkboxes filter the underlying data via `d3.rollup`, recalculating totals and redrawing the chart, while `mouseover` events show tooltips with production values. The SVG rendering includes a legend and interactive state highlighting.
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