Class IgxNumberSummaryOperand

Hierarchy

Hierarchy (view full)

Constructors

Methods

  • 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;

    Memberof

    IgxNumberSummaryOperand

    Parameters

    • data: any[] = []
    • allData: any[] = []
    • Optional fieldName: string
    • Optional groupRecord: IGroupByRecord

    Returns IgxSummaryResult[]

  • 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);
    

    Memberof

    IgxNumberSummaryOperand

    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);
    

    Memberof

    IgxNumberSummaryOperand

    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);
    

    Memberof

    IgxNumberSummaryOperand

    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);
    

    Memberof

    IgxNumberSummaryOperand

    Parameters

    • data: any[]

    Returns number