Javascript Pivot Table JQuery Pivot Table Plugin + ASP.NET MVC Core integration
js pivot open-source jQuery pivottable.js plugin
- Lightweight, free and open source javascript pivot table: Pivottable.js (pivot.js)
- user-friendly drag&drop UI for creating pivot table (crosstab, summary table)
- handles up to 100,000 rows, all calculations are performed by js code
- supports typical aggregate functions: count, count unique values, list unique values, sum, average, min, max, % of totals; custom function can be easily added
- additional renderers: heatmaps, pivot charts (Google Charts / C3.js)
nreco extensions advanced features for pivottable.js
- fixed headers (freeze headers for pivot table rows & columns)new
- sort pivot table by values, totals or labels
- drill down handler (click on cell and see aggregated data details)
- access to calculated pivot table data (for pivot table exports)
- Bootstrap 3 styles (can be upgraded to 5.x)
-
ASP.NET MVC Core WebPivot Report Builder package includes:
- PivotTable.js NReco Extensions (commercial version)
- Data query builder js components (jQuery plugins)
- NReco WebPivot Editor (integrates pivottable.js + NReco extensions with data query builder)
- Server-side API for loading data by used-defined query from SQL database (based on NReco.Data library)
- Export pivot table components (CSV, Excel, PDF)
- Integrated ASP.NET example (MVC Core app, NET8):
- use SQL database as data source for pivot table
- server-side data filter: reduce amount of data for javascript pivot table
- save / load pivot table report state (user-defined reports)
- export pivot table to CSV/Excel/PDF formats
- 1 year of email support and free package code updates
download and pricing
NReco PivotTable.js Extensions FREE pack
NReco extensions free version with "Powered by" notice, HTML+js usage examples, NO support |
Download for Free |
NReco PivotTable.js Extensions Commercial pack
Includes: NReco extensions commercial version (without "Powered by" notice), HTML+js usage examples, commercial license for 1 project, 1 year of email support and free component updates |
$99 - Order Now |
ASP.NET MVC Core WebPivot Report Builder pack
Includes: commercial version of js components (without "Powered by" notice), Bootstrap styles, server-side C# components (NET8) with source code, license for 1 project, 1 year of email support |
$199 - Order Now |
quick purchase process
- 1 Choose a package
- 2 Pay online
- 3 Download the package
NReco Web Pivot Builder package allows you to embed javascript pivot tables into any ASP.NET application (MVC,WebForms).
Reports are configured by end-user in a web browser and may be exported to CSV, Excel and PDF.
Looking for server-side pivot table component? Try NReco PivotData Toolkit.
Looking for server-side pivot table component? Try NReco PivotData Toolkit.
how to use
- Include jQuery, pivot.js and nrecopivottableext.js files
- Initialize PivotTable jQuery plugin and apply NReco Extensions with the following js code:
var nrecoPivotExt = new NRecoPivotTableExtensions({ drillDownHandler: function (dataFilter) { console.log(dataFilter); } }); var sampleData = [{"A":1,"B":1,V:1}, ... ]; var pvtOpts = { renderer: nrecoPivotExt.wrapTableRenderer($.pivotUtilities.renderers["Table"]), rendererOptions: { sort: { direction : "desc", column_key : [ "1" ]} }, vals: ["V"], rows: ["A"], cols: ["B"], aggregator : $.pivotUtilities.aggregators["Sum"](["V"]), } $('#pivot').pivot(sampleData, pvtOpts);
javascript pivot table example
Click on col/row labels or totals to sort data by values.
Click on cell to see aggregated rows (drill-down).
ASP.NET Web Pivot Table Builder Online Demo
Click on cell to see aggregated rows (drill-down).
ASP.NET Web Pivot Table Builder Online Demo
plugin options
Option | Description | Example |
---|---|---|
fixedHeaders |
Default: true. If enabled and pivot table has an overflow (container element limited in width and/or height) fixed headers are used. | { fixedHeaders: true } |
sortByLabelEnabled |
Default: true. If enabled user can click on dimension name to order table by dimension labels (keys). | { sortByLabelEnabled: true } |
sortByColumnsEnabled |
Default: true. If enabled user can click on column label to order table by column values. | { sortByColumnsEnabled: true } |
sortByRowsEnabled |
Default: true. If enabled user can click on row label to order table by row values. | { sortByRowsEnabled: true } |
wrapWith |
Default: null. Wraps <table> with specified element. Useful when fixedHeaders=true to limit pivot table by height and/or width. | { wrapWith: '<div class="pvtTableRendererHolder">>/div>', } |
drillDownHandler |
Default: null (function). This function is called when user clicks on table value cell. Argument is a (dimension name)→(dimension key) map for the clicked row x column intersection. | { drillDownHandler: function (attrFilter) { console.log(attrFilter); } } |
onSortHandler |
Default: null (function). This function is called when user changes order of the pivot table. Argument is a structure that describes sort state (rendererOptions.sort entry). | { onSortHandler:function (sortOpts) {console.log(sortOpts);} } |
frequently asked questions
In some cases pivot table should be generated on server side (for example, report generation on schedule).
It is possible to render PivotTable.js on the server side with one of the following tools:
- PhantomJS (headless WebKit browser): PhantomJS .NET Wrapper
- WkHtmlToPdf/WkHtmlToImage (also based on WebKit browser engine): PDF Generator for .NET / Image Generator for .NET
Pivottable.js plugin is not suitable in this case: it performs all calculations in a web browser
(dataset is aggregated by javascript code). Depending on concrete environment
(web browser, available memory) it can load and handle a bit more than 100k rows but in most cases this leads to weird user experience
(slowness, freezes, browser crush).
For large datasets you may use components that perform pivot table calculations on the server-side:
- PivotData Toolkit: .NET library for ASP.NET projects
- PivotData REST Service: .NET Core backend, can be hosted on Linux or Windows and integrated with any web application (PHP, Ruby, Python, NodeJS, Java).
Free version of NReco extensions (nrecopivottableext.js, nrecopivottableext.css)
can be used and redistributed without any limitations.
Note that any modifications in the javascript code are NOT allowed,
as well as removing or hiding "powered by" notice.
You may purchase commercial package with per-project license to avoid these restrictions and remove "powered by" notice.
You may purchase commercial package with per-project license to avoid these restrictions and remove "powered by" notice.
what's new
2024 Jan 29 |
Changes:
|
2018 Jul 18 |
Changes:
|
2018 Apr 03 |
Changes:
|
2017 May 15 |
Changes:
|
2017 Jan 31 |
Changes:
|
2016 May 24 |
Changes:
|
2015 Nov 26 |
Changes:
|
2015 Nov 18 |
Changes:
|
2015 Jun 19 |
Changes:
|
2015 Apr 05 |
Changes:
|
2015 Jan 15 | Initial Javascript Pivot Table ASP.NET package release |
similar components
-
PivotData Toolkit for .NET
.NET components for manipulating multidimensional dataset (in-memory data cube) without OLAP server, aggregating huge datasets, calculating data for pivot tables / charts, web pivot table control for ASP.NET MVC/Blazor.
-
PivotData Microservice
On-premises NET8 app that provides web API for PivotData Toolkit functionality: create pivot tables & charts by SQL/MongoDb/ElasticSearch databases, export reports to Excel/PDF/JSON/CSV/Image. Can be used as a backend for web pivot table builder.