Pivoting

Row Aggregations

LyteNyte Grid uses the aggModel in grid state to define how grouped rows are aggregated.
Aggregations calculate summary values for group rows. Leaf rows are not aggregated-they provide the source data for the calculations.

Row Grouping

Aggregation Model

aggModel is an object where each key corresponds to a key in the final aggregation output. The output is an object of key value pairs. Often the key matches a column id, but it doesn't have to.

Each entry in aggModel contains:

  • fn - The aggregation function to apply.

LyteNyte Grid's client data sources include built-in aggregation functions, and you can define custom ones.

How Aggregations Are Calculated

The row data source performs the aggregation:

You don't need to define aggregations for every column-apply them only where they make sense.