| `PivotData` | `data`<br/> see below for formats | (none, required) | data to be summarized |
| `PivotData` | `rows`<br/> array of strings | `[]` | attribute names to prepopulate in row area |
| `PivotData` | `cols`<br/> array of strings | `[]` | attribute names to prepopulate in cols area |
| `PivotData` | `vals`<br/> array of strings | `[]` | attribute names used as arguments to aggregator (gets passed to aggregator generating function) |
| `PivotData` | `aggregators`<br/> object of functions | `aggregators` from `Utilites` | dictionary of generators for aggregation functions in dropdown (see [original PivotTable.js documentation](https://github.com/nicolaskruchten/pivottable/wiki/Aggregators)) |
| `PivotData` | `aggregatorName`<br/> string | first key in `aggregators` | key to `aggregators` object specifying the aggregator to use for computations |
| `PivotData` | `valueFilter`<br/> object of arrays of strings | `{}` | object whose keys are attribute names and values are objects of attribute value-boolean pairs which denote records to include or exclude from computation and rendering; used to prepopulate the filter menus that appear on double-click |
| `PivotData` | `sorters`<br/> object or function | `{}` | accessed or called with an attribute name and can return a [function which can be used as an argument to `array.sort`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) for output purposes. If no function is returned, the default sorting mechanism is a built-in "natural sort" implementation. Useful for sorting attributes like month names, see [original PivotTable.js example 1](http://nicolas.kruchten.com/pivottable/examples/mps_agg.html) and [original PivotTable.js example 2](http://nicolas.kruchten.com/pivottable/examples/montreal_2014.html). |
| `PivotData` | `rowOrder`<br/> string | `"key_a_to_z"` | the order in which row data is provided to the renderer, must be one of `"key_a_to_z"`, `"value_a_to_z"`, `"value_z_to_a"`, ordering by value orders by row total |
| `PivotData` | `colOrder`<br/> string | `"key_a_to_z"` | the order in which column data is provided to the renderer, must be one of `"key_a_to_z"`, `"value_a_to_z"`, `"value_z_to_a"`, ordering by value orders by column total |
| `PivotData` | `derivedAttributes`<br/> object of functions | `{}` | defines derived attributes (see [original PivotTable.js documentation](https://github.com/nicolaskruchten/pivottable/wiki/Derived-Attributes)) |
| `Renderer` | `<any>` | (none, optional) | Renderers may accept any additional properties |
| `PivotTable` | `renderers`<br/> object of functions | `TableRenderers` | dictionary of renderer components |
| `PivotTable` | `rendererName`<br/> string | first key in `renderers` | key to `renderers` object specifying the renderer to use |
| `PivotTableUI` | `onChange`<br/> function | (none, required) | function called every time anything changes in the UI, with the new value of the properties needed to render the new state. This function must be hooked into a state-management system in order for the "dumb" `PivotTableUI` component to work. |
| `PivotTableUI` | `hiddenAttributes`<br/> array of strings | `[]` | contains attribute names to omit from the UI |
| `PivotTableUI` | `hiddenFromAggregators`<br/> array of strings | `[]` | contains attribute names to omit from the aggregator arguments dropdowns |
| `PivotTableUI` | `hiddenFromDragDrop`<br/> array of strings | `[]` | contains attribute names to omit from the drag'n'drop portion of the UI |
| `PivotTableUI` | `menuLimit`<br/> integer | 500 | maximum number of values to list in the double-click menu |
| `PivotTableUI` | `unusedOrientationCutoff`<br/> integer | 85 | If the attributes' names' combined length in characters exceeds this value then the unused attributes area will be shown vertically to the left of the UI instead of horizontally above it. `0` therefore means 'always vertical', and `Infinity` means 'always horizontal'. |
### Accepted formats for `data`
#### Arrays of objects
One object per record, the object's keys are the attribute names.
_Note_: missing attributes or attributes with a value of `null` are treated as
if the value was the string `"null"`.
```js
const data = [
{
attr1: 'value1_attr1',
attr2: 'value1_attr2',
//...
},
{
attr1: 'value2_attr1',
attr2: 'value2_attr2',
//...
},
//...
];
```
#### Arrays of arrays
One sub-array per record, the first sub-array contains the attribute names. If
subsequent sub-arrays are shorter than the first one, the trailing values are
treated as if they contained the string value `"null"`. If subsequent sub-arrays
are longer than the first one, excess values are ignored. This format is
compatible with the output of CSV parsing libraries like PapaParse.
```js
const data = [
['attr1', 'attr2'],
['value1_attr1', 'value1_attr2'],
['value2_attr1', 'value2_attr2'],
//...
];
```
#### Functions that call back
The function will be called with a callback that takes an object as a parameter.
_Note_: missing attributes or attributes with a value of `null` are treated as