LyteNyte Grid logo for light mode. Links back to the documentation home page.
Pivoting

Row Aggregations

Use row aggregations in LyteNyte Grid to calculate and display summary data for grouped rows with customizable aggregation functions.

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.