Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pivot Table with D3.js

Public visualization

Viewing a saved revision (read-only)

09dd8e4e30284166acdbe278930b9c4c

Pivot Table with D3.js

0 stars1🌍 Public
Hhelbizfy
Last edited Oct 23, 2023
Created on Oct 23, 2023
Forked from Hello HTML

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.

AI-generated description

A bare minimum HTML page.