Class IgxNumberSummaryOperand

Hierarchy

Methods

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[]): IgxSummaryResult[] {
        const result = [];
        result.push({
          key: "avg",
          label: "Avg",
          summaryResult: IgxNumberSummaryOperand.average(data)
        });
        result.push({
          key: "max",
          label: "Max",
          summaryResult: IgxNumberSummaryOperand.max(data)
        });
        return result;
      }
    }
    this.grid.getColumnByName('ColumnName').summaries = CustomNumberSummary;
    memberof

    IgxNumberSummaryOperand

    Parameters

    • Default value data: any[] = []

    Returns IgxSummaryResult[]

Static average

  • average(data: any[]): number
  • 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

Static count

  • count(data: any[]): number

Static max

  • max(data: any[]): 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

Static min

  • min(data: any[]): 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

Static sum

  • sum(data: any[]): 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