defaultOperation

defines the default data operation

string defaultOperation;

Values

  • "sum"
  • "count"
  • "min"
  • "max"
  • "avg"
  • "wavg"
  • "any"
  • custom operation
  • Example

    webix.ui({
      view: "pivot",
      url: "https://docs.webix.com/pivot-backend/",
      defaultOperation: "avg",   structure: {
        rows: ["form", "name"],
        columns: ["year"],
        values: [{ name: "oil", operation: ["min", "max", "sum"] }],
      },
    });

    Related samples

    Details

    You can define a custom operations via the operations object.

    operations: {
      floor: v => v.reduce((acc, a) => acc + Math.floor(a), 0),
    },
    See also
    Back to top