PivotForge.AspNetCore
0.6.0-preview.6
dotnet add package PivotForge.AspNetCore --version 0.6.0-preview.6
NuGet\Install-Package PivotForge.AspNetCore -Version 0.6.0-preview.6
<PackageReference Include="PivotForge.AspNetCore" Version="0.6.0-preview.6" />
<PackageVersion Include="PivotForge.AspNetCore" Version="0.6.0-preview.6" />
<PackageReference Include="PivotForge.AspNetCore" />
paket add PivotForge.AspNetCore --version 0.6.0-preview.6
#r "nuget: PivotForge.AspNetCore, 0.6.0-preview.6"
#:package PivotForge.AspNetCore@0.6.0-preview.6
#addin nuget:?package=PivotForge.AspNetCore&version=0.6.0-preview.6&prerelease
#tool nuget:?package=PivotForge.AspNetCore&version=0.6.0-preview.6&prerelease
PivotForge for ASP.NET Core
PivotForge.AspNetCore adds reusable browser assets and minimal API endpoints to the PivotForge Core engine.
Installation
dotnet add package PivotForge.AspNetCore --version 0.5.0-preview.1
Register services
using PivotForge.AspNetCore.DependencyInjection;
builder.Services.AddPivotForge<Sale>(
(request, cancellationToken) =>
ValueTask.FromResult<IReadOnlyList<Sale>>(LoadSales(request.SourceRowCount)),
options =>
{
options.CacheSlidingExpiration = TimeSpan.FromMinutes(5);
options.MaximumSourceRowCount = 500_000;
});
For request-scoped dependencies such as a tenant-aware database context, implement
IPivotForgeDataProvider<TRecord> and register the provider type:
builder.Services.AddPivotForge<Sale, TenantSaleProvider>();
The provider is called for pivot and drill-down requests. SourceRowCount is null for a normal pivot and contains the bounded requested size for large-data and drill-down requests.
Large-result cache identities include the authenticated user, endpoint path, and query string.
Map endpoints and assets
using PivotForge.AspNetCore.Endpoints;
app.UseStaticFiles();
app.MapPivotForgeEndpoints();
The default endpoint prefix is /pivotforge. Static assets are available at:
<link rel="stylesheet" href="/_content/PivotForge.AspNetCore/css/pivotforge.css">
<script src="/_content/PivotForge.AspNetCore/js/pivot-table.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-request-builder.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-widget.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-layout-state.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-field-designer.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-filter-picker.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-view-storage.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-drill-down.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-drill-down-modal.js"></script>
<script src="/_content/PivotForge.AspNetCore/js/pivot-virtual-data-source.js"></script>
Load them in <head>, not at the end of <body>, and in the order shown: pivot-table.js must load before pivot-widget.js, pivot-layout-state.js and pivot-field-designer.js must load before pivot-widget.js is asked to build a designer, and any Razor helper that calls PivotForge.create inline (see below) needs all of them already loaded when its markup runs.
The scripts expose their browser APIs under window.PivotForge.
Declarative rendering
With the fields declared in the view, no manual JavaScript wiring is needed:
@(Html.PivotForge().PivotGrid()
.Id("pivotGrid")
.AllowSorting(true)
.AllowFiltering(true)
.Fields(fields =>
{
fields.Add().Caption("Bölge").DataField("Region").Area(PivotArea.Row);
fields.Add().Caption("Kategori").DataField("Category").Area(PivotArea.Row);
fields.Add().Caption("Yıl").DataField("Year").Area(PivotArea.Column);
fields.Add().Caption("Tutar").DataField("Amount")
.Aggregation(PivotAggregation.Sum).Area(PivotArea.Data);
}))
The same grid is also available as tag helpers. Register them once in
_ViewImports.cshtml with @addTagHelper *, PivotForge.AspNetCore:
<pivot-grid id="pivotGrid" allow-sorting="true" allow-filtering="true">
<pivot-field field="Region" caption="Bölge" area="Row" />
<pivot-field field="Category" caption="Kategori" area="Row" />
<pivot-field field="Year" caption="Yıl" area="Column" />
<pivot-field field="Amount" caption="Tutar" area="Data" aggregation="Sum" />
</pivot-grid>
Both Razor forms render identical markup. area, aggregation, and show-as
are enum-typed, so a misspelled value is a compile error.
The same configuration is available directly from JavaScript:
PivotForge.create("#pivotGrid", {
fields: [
{ caption: "Bölge", dataField: "Region", area: "row" },
{ caption: "Kategori", dataField: "Category", area: "row" },
{ caption: "Yıl", dataField: "Year", area: "column" },
{ caption: "Tutar", dataField: "Amount", area: "data", aggregation: "sum" }
]
});
To capture the widget instance from page code, register a capture-phase pivotforge:ready listener on document before the helper's markup runs — a listener attached to the container afterward never fires:
<script>
document.addEventListener(
"pivotforge:ready",
event => { window.pivotGridWidget = event.detail.widget; },
true);
</script>
Saved views, conditional formatting, and selection/clipboard behavior still use the lower-level PivotTableRenderer API. See the ASP.NET Core integration guide for the full declarative API reference.
Field designer
Name a host element and get a drag-and-drop panel — a searchable available-field list plus filters/columns/rows/values drop zones — that builds the layout at runtime:
<div id="designerHost"></div>
<pivot-grid id="pivotGrid" field-designer="#designerHost">
<pivot-field field="Region" caption="Bölge" area="Row" />
<pivot-field field="Year" caption="Yıl" area="Column" />
<pivot-field field="Amount" caption="Tutar" area="Data" aggregation="Sum" />
<pivot-field field="Quantity" caption="Miktar" area="Available" role="Measure" />
</pivot-grid>
A field placed in Available needs an explicit role (Dimension or Measure), because there is no area to infer it from; role rules then govern where it can be dropped — a measure only into the data area, a dimension into row/column/filter.
Chips are moved with a mouse, a finger or a pen (a touch drag starts from the chip's grip), or entirely from the keyboard: Space picks a field up, the arrow keys move it between zones and slots, Space drops it and Escape cancels. A filter chip's ▼ opens a packaged value picker. Still missing: a show-as menu is in the per-field settings modal but a sort panel is not. See Field designer in the integration guide for the full reference.
Endpoint routes
POST /pivotforge/pivotPOST /pivotforge/large/startPOST /pivotforge/large/pagePOST /pivotforge/drill-downPOST /pivotforge/excel
Pass a different prefix to MapPivotForgeEndpoints("/reports/pivot") when required.
PivotForge.AspNetCore is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- PivotForge.Core (>= 0.6.0-preview.6)
-
net8.0
- PivotForge.Core (>= 0.6.0-preview.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.6.0-preview.6 | 65 | 10/2/2026 |
| 0.6.0-preview.5 | 50 | 9/30/2026 |
| 0.6.0-preview.4 | 60 | 9/30/2026 |
| 0.6.0-preview.3 | 49 | 9/30/2026 |
| 0.6.0-preview.2 | 58 | 9/30/2026 |
| 0.6.0-preview.1 | 53 | 9/29/2026 |
| 0.5.0-preview.1 | 85 | 8/17/2026 |
| 0.4.0-preview.8 | 72 | 8/16/2026 |
| 0.4.0-preview.7 | 74 | 8/16/2026 |
| 0.4.0-preview.6 | 74 | 8/16/2026 |
| 0.4.0-preview.5 | 72 | 8/16/2026 |
| 0.4.0-preview.4 | 67 | 8/16/2026 |
| 0.4.0-preview.3 | 65 | 8/16/2026 |
| 0.4.0-preview.2 | 69 | 8/16/2026 |
| 0.4.0-preview.1 | 63 | 8/16/2026 |
| 0.3.0-preview.2 | 69 | 8/16/2026 |
| 0.3.0-preview.1 | 78 | 8/16/2026 |
| 0.2.0-preview.1 | 71 | 8/15/2026 |
| 0.1.0-preview.2 | 73 | 8/14/2026 |
| 0.1.0-preview.1 | 77 | 8/14/2026 |
See https://github.com/alican645/PivotForge/blob/main/CHANGELOG.md for the changes in this and every earlier version.