{"version":"1.0","type":"rich","title":"Pivot Table with D3.js","description":"This example builds a pivot table with D3.js v6, grouping expense records by head group and expense type and summing their amounts. It uses `d3.group()` with `.key()` and `.rollup()` to aggregate the nested data, then renders the result as an HTML table with `thead`, `tbody`, `tr`, and `td` elements. The table shows three columns—Head Group, Expense Type, and Total—with sub-rows for each expense type beneath its group, and a cell for the aggregated sum. The data is hardcoded as an array of objects with fields for group, type, date, and amount.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/f519e63056bf4e349754b8d48067f669?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}