Let users summarize a list into a cross-table: fields on the rows, fields across the columns and figures in the cells, with subtotals, grand totals and drill-down.
Why it helps
- Cross-tabs from your own list
- Subtotals and grand totals
- Drill into a cell
Where it fits
- Sales by region and month
- Cost analysis
- Survey results
Example
<PivotGrid TItem="Sale" ShowExport="true" ExportFileName="average-sale" Items="SalesData.All" Label="Average sale" ShowGrandTotals="true" Dense="true">
<Fields>
<PivotField Title="Region" Value="@(s => s.Region)" Area="PivotArea.Row" />
<PivotField Title="Product" Value="@(s => s.Product)" Area="PivotArea.Column" />
<PivotField Title="Year" Value="@(s => s.Year)" Area="PivotArea.Hidden" />
<PivotField Title="Amount" Value="@(s => s.Amount)" Area="PivotArea.Value" Aggregate="DataGridAggregate.Average" Format="N0" />
<PivotField Title="Units" Value="@(s => s.Units)" Area="PivotArea.Value" Aggregate="DataGridAggregate.Max" Format="N0" />
</Fields>
</PivotGrid> A short fragment. Add @using RayCraft.Blazor.Components to your page and use an interactive render mode.
Part of RayCraft Complete.