Skip to main content
100%

pivot D3.js

✓ Published0🌍 Public
Vvelitetik@gmail.com
Last edited Aug 28, 2024
Created on Aug 28, 2024

This example demonstrates a pivot table visualization built with D3.js v6, displaying aggregated expense data grouped by head group and expense type. The table organizes rows hierarchically, with parent rows for each head group and nested sub-rows for expense types, alongside a calculated total column derived from summing the 'Amount' field. The code employs D3's `d3.group()` and `d3.sum()` APIs for data grouping and aggregation, then constructs an HTML table structure dynamically using `select`, `append`, and `enter()` to render rows and cells. The source data is a static array of expense records, and the rendering approach uses standard D3 DOM manipulation to create the tabular layout.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes