Constructors
Section titled "Constructors"IgxNumberSummaryOperand
new IgxNumberSummaryOperand(): IgxNumberSummaryOperand Returns IgxNumberSummaryOperand
Methods
Section titled "Methods"operate
Section titled "operate"Executes the static methods and returns IgxSummaryResult[].
interface IgxSummaryResult {
key: string;
label: string;
summaryResult: any;
}Can be overridden in the inherited classes to provide customization for the summary.
class CustomNumberSummary extends IgxNumberSummaryOperand {
constructor() {
super();
}
public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] {
const result = super.operate(data, allData, fieldName, groupRecord);
result.push({
key: "avg",
label: "Avg",
summaryResult: IgxNumberSummaryOperand.average(data)
});
result.push({
key: 'mdn',
label: 'Median',
summaryResult: this.findMedian(data)
});
return result;
}
}
this.grid.getColumnByName('ColumnName').summaries = CustomNumberSummary;operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] Defined in projects/igniteui-angular/grids/core/src/summaries/grid-summary.ts:147
Parameters
- data:
any[] - allData:
any[] - fieldName:
string - groupRecord:
IGroupByRecord
Returns IgxSummaryResult[]
average
Section titled "average"Returns the average numeric value in the data provided data records. If filtering is applied, returns the average numeric value in the filtered data records.
IgxSummaryOperand.average(data);average(data: any[]): number Defined in projects/igniteui-angular/grids/core/src/summaries/grid-summary.ts:109
Parameters
- data:
any[]
Returns number
count
Section titled "count"Inherited from: IgxSummaryOperand
Counts all the records in the data source. If filtering is applied, counts only the filtered records.
IgxSummaryOperand.count(dataSource);count(data: any[]): number Defined in projects/igniteui-angular/grids/core/src/summaries/grid-summary.ts:18
Parameters
- data:
any[]
Returns number
Returns the maximum numeric value in the provided data records. If filtering is applied, returns the maximum value in the filtered data records.
IgxNumberSummaryOperand.max(data);max(data: any[]): number Defined in projects/igniteui-angular/grids/core/src/summaries/grid-summary.ts:85
Parameters
- data:
any[]
Returns number
Returns the minimum numeric value in the provided data records. If filtering is applied, returns the minimum value in the filtered data records.
IgxNumberSummaryOperand.min(data);min(data: any[]): number Defined in projects/igniteui-angular/grids/core/src/summaries/grid-summary.ts:73
Parameters
- data:
any[]
Returns number
Returns the sum of the numeric values in the provided data records. If filtering is applied, returns the sum of the numeric values in the data records.
IgxNumberSummaryOperand.sum(data);sum(data: any[]): number Defined in projects/igniteui-angular/grids/core/src/summaries/grid-summary.ts:97
Parameters
- data:
any[]