Skip to content

Commit

Permalink
[#38] Initial Expand/Collapse Behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
nagarajanchinnasamy committed Sep 11, 2017
1 parent cfc44d3 commit b199997
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 93 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[Subtotal.js](http://nagarajanchinnasamy.com/subtotal) is an open-source JavaScript plugin for **PivotTable.js** . Subtotal.js renders rows and columns of a pivot table with subtotals and lets the user to expand or collapse rows and columns. Its originally written by [Nagarajan Chinnasamy](https://github.com/nagarajanchinnasamy/) at [Mindtree](http://mindtree.com/).


It is available under an MIT license from [NPM](https://www.npmjs.com/package/subtotal) and [Bower](http://bower.io/) under the name `subtotal`. On [packagist.org](https://packagist.org/), it is `nagarajanchinnasamy/subtotal`.
It is available under an MIT license from [NPM](https://www.npmjs.com/package/subtotal) and [Bower](http://bower.io/) under the name `subtotal`. On [packagist.org](https://packagist.org/packages/nagarajanchinnasamy/subtotal), it is `nagarajanchinnasamy/subtotal`.


[PivotTable.js](http://nicolas.kruchten.com/pivottable) is a Javascript Pivot Table library with drag'n'drop functionality built on top of jQuery/jQueryUI and originally written in CoffeeScript by [Nicolas Kruchten](http://nicolas.kruchten.com) at [Datacratic](http://datacratic.com).
Expand Down
113 changes: 64 additions & 49 deletions dist/subtotal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/subtotal.js.map

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions examples/210_collapse_rowscols.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
$.getJSON("data/mps.json", function(mps) {
$("#output").pivotUI(mps, {
dataClass: dataClass,
rows: ["Gender", "Province", "Age Bin"],
cols: ["Party", "Age", "Gender Imbalance"],
rows: ["Gender"],
cols: ["Province", "Party", "Age Bin", "Gender Imbalance"],
renderers: renderers,
derivedAttributes: {
"Age Bin": derivers.bin("Age", 10),
Expand All @@ -45,8 +45,12 @@
},
rendererName: "Table With Subtotal",
rendererOptions: {
collapseRowsAt: 1,
collapseColsAt: 0
collapseRowsAt: 0,
collapseColsAt: 1,
colSubtotalDisplay: {
hideOnExpand: true,
disableAfter: 1
}
}
});
});
Expand Down
Loading

0 comments on commit b199997

Please sign in to comment.