Example of Default Aggregate in Angular Tree Grid Component

This sample demonstrates aggregate functionality of the Tree Grid. In this sample, the aggregate value for the columns “Total Units” and “Unit Weight” is displayed in column footer and provide an option to show child summary.

CX2389NK
Maersk Edibles Co.241598
QW4567OP
Chang50123
QW3458BH
Aniseed Syrup8789
QW8967OH
Chef Antons Cajun Seasoning5446
QW6549NJ
Chef Antons Gumbo Mix50340
8746
DW8954IO
Aeon fitness inc.2961720
UF5647YH
Reebox CrossFit Back Bay73600
UF1290LK
The Green Microgym90569
UF8956KU
DeFrancos68456
UF7464JK
Westside Barbell6595
9095
EJ9456KN
Sun technologies inc192331
GH2367OP
Haier Group2378
GH4309TH
Panda Electronics4890
GH3494SD
Jiangsu Etern5636
GH3213FR
Zhejiang Fuchunjiang65127
6536
Properties
Show Child Summary
Description

The Tree Grid supports aggregates which will be displayed at the footer and every hierarchy level. The aggregate configurations can be provided by the aggregates property.

The built-in aggregates are,

  • Sum
  • Average
  • Min
  • Max
  • Count
  • TrueCount
  • FalseCount
  • Custom - Requires the customAggregate property to perform aggregation.

Injecting Module:

Tree Grid component features are segregated into individual feature-wise modules. To use aggregate feature, we need to inject AggregateService into the @NgModule.providers section.

More information about aggregate can be found in this documentation section.