Skip to content

Commit

Permalink
Merge branch 'master' into fix-toggle-function
Browse files Browse the repository at this point in the history
  • Loading branch information
turnerniles committed Mar 12, 2017
2 parents ed20c4c + 5df4500 commit e9fc59c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
13 changes: 13 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## [v2.1.0]
> Mar 11, 2017
- Adding the following aggregation types
- `average`
- `min`
- `max`
- Adding a `.toggle` method to toggle a row to collapsed if expanded or vice-versa


[#30]: https://github.com/pat310/quick-pivot/pull/30
[#31]: https://github.com/pat310/quick-pivot/pull/31

## [v2.0.0]
> Feb 5, 2017
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const pivot = new Pivot(dataArray, rows, columns, [accumulationCategory or CBfun
* `rows` is an array of strings (the rows you want to pivot on) or an empty array **required**
* `columns` is an array of strings (the columns you want to pivot on) or an empty array **required**
* `accumulationCategory` is a string (the category you want to accumulate values for) **required**
* `accumulationType` is an enumerated string - either `'sum'` or `'count'` (the type of accumulation you want to perform). If no type is selected, `'count'` is chosen by default
* `accumulationType` is an enumerated string - either `'sum'`, `'count'`, `'min'`, `'max'`, or `'average'` (the type of accumulation you want to perform). If no type is selected, `'count'` is chosen by default
* `rowHeader` is a string (this value will appear above the rows)

#### Second way to use it:
Expand All @@ -185,6 +185,9 @@ Collapses data into the specified row header provided. `rowNum` is the row head
#### `.expand(rowNum)`
Expands collapsed data that has previously been collapsed. The `expand` method is chainable.

#### `.toggle(rowNum)`
Toggles data from collapsed to expanded or vice-versa. The `toggle` method is chainable.

#### `.getData(rowNum)`
Returns the data that comprises a collapsed row

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quick-pivot",
"version": "2.0.2",
"version": "2.1.0",
"description": "a utility for quickly pivoting data",
"main": "lib/quick-pivot.min.js",
"scripts": {
Expand Down

0 comments on commit e9fc59c

Please sign in to comment.