Aggregation
ZingGrid has default behaviors for calculating the average, count, min, max, and sum values for a given column. These aggregation values are displayed in a single row at the base of the grid.
Average
Display the average of a column's values in the footer, like so:
<zg-column index="exampleIndexName" foot-cell="avg"></zg-column>
Average Calculated Grid
Here is a complete grid with the average of each column calculated in the grid's footer:
Count
Display the count of a column's items (i.e., the number of rows containing data) in the footer, like so:
<zg-column index="exampleIndexName" foot-cell="count"></zg-column>
Count Calculated Grid
Here is a complete grid with the number of rows containing data calculated for each column in the grid's footer:
Min
Display the minimum value of a column in the footer, like so:
<zg-column index="exampleIndexName" foot-cell="min"></zg-column>
Min Calculated Grid
Here is a complete grid displaying the lowest value of each column in the grid's footer:
Max
Display the maximum value of a column in the footer, like so:
<zg-column index="exampleIndexName" foot-cell="max"></zg-column>
Max Calculated Grid
Here is a complete grid displaying the highest value of each column in the grid's footer:
Sum
Display the sum total of a column's values in the footer, like so:
<zg-column index="exampleIndexName" foot-cell="sum"></zg-column>
Sum Calculated Grid
Here is a complete grid with the sum total of each column calculated in the grid's footer:
Related Resources
Here are some extra resources related to this feature to help with creating your grid:
[features: aggregation]