kapom-report - v0.1.2
    Preparing search index...

    Interface DataColumn<T>

    interface DataColumn<T> {
        aggregate?: AggregateFn | ((rows: readonly T[]) => Decimalish);
        align?: HAlign;
        cellRenderer?: (value: T[keyof T], row: T) => string;
        cellStyle?: Partial<CellStyle>;
        conditionalStyle?: (row: T) => Partial<CellStyle> | undefined;
        formatter?: (value: T[keyof T], row: T) => string;
        header: string;
        headerAlign?: HAlign;
        headerStyle?: Partial<CellStyle>;
        key: keyof T;
        numberFormat?: NumberFormat;
        type?: "data";
        visible?: boolean | (() => boolean);
        width?: number;
    }

    Type Parameters

    • T

    Hierarchy

    • TypedColumnBase<T>
      • DataColumn
    Index
    aggregate?: AggregateFn | ((rows: readonly T[]) => Decimalish)

    the engine automatically sums this column in the group footer + summary

    align?: HAlign

    data cell alignment; default 'left'

    cellRenderer?: (value: T[keyof T], row: T) => string

    render override — returns a string; conditional styling is handled by a separate resolver

    cellStyle?: Partial<CellStyle>

    static style for this column's body cells — incl. fillColor for a column background

    conditionalStyle?: (row: T) => Partial<CellStyle> | undefined

    value-driven counterpart of cellStyle — returns a Partial<CellStyle> for THIS column's body cell based on the row (e.g. a red fillColor when the value is negative), or undefined to leave it to cellStyle. Mirrors the table-level style.conditional (row) at the column scope, and is applied as the most specific layer (on top of style.conditional/style.zebra).

    formatter?: (value: T[keyof T], row: T) => string
    header: string
    headerAlign?: HAlign

    header cell alignment; default = the align value

    headerStyle?: Partial<CellStyle>

    static style for this column's head cell (all table/column style is CellStyle)

    key: keyof T
    numberFormat?: NumberFormat
    type?: "data"

    the default column kind — may be omitted; normalized to 'data' at build time

    visible?: boolean | (() => boolean)

    conditionally show/hide; default true

    width?: number