View as Markdown

API reference: @salmonui/pivot-table/engine

PivotEngineOptionsinterface

import type { PivotEngineOptions } from '@salmonui/pivot-table/engine';
interface PivotEngineOptions<Row> {
    readonly data: readonly Row[];
    readonly fields?: readonly PivotFieldDefinition<Row>[];
    readonly model?: PivotModelInput;
    readonly locale?: string;
    readonly customAggregates?: Readonly<Record<string, PivotCustomAggregator>>;
    readonly getCellValue?: (cell: PivotCell) => number | null;
    readonly text?: PivotEngineText;
}
PivotEngineOptions members (7)
NameSignatureDescription
datareadonly data: readonly Row[];
fieldsoptionalreadonly fields?: readonly PivotFieldDefinition<Row>[];

Inferred from the first rows when omitted.

modeloptionalreadonly model?: PivotModelInput;
localeoptionalreadonly locale?: string;
customAggregatesoptionalreadonly customAggregates?: Readonly<Record<string, PivotCustomAggregator>>;
getCellValueoptionalreadonly getCellValue?: (cell: PivotCell) => number | null;

Pure override of a cell value.

textoptionalreadonly text?: PivotEngineText;