Interface INumberColumn

a column in LineUp

interface INumberColumn {
    desc: Readonly<IColumnDesc>;
    parent: Readonly<IColumnParent>;
    get description(): string;
    get fixed(): boolean;
    get fqid(): string;
    get fqpath(): string;
    get frozen(): boolean;
    get id(): string;
    get label(): string;
    assignNewId(idGenerator: () => string): void;
    attach(parent: IColumnParent): void;
    clearFilter(): boolean;
    createEventList(): string[];
    detach(): void;
    dump(toDescRef: (desc: any) => any): any;
    filter(row: IDataRow, _valueCache?: any): boolean;
    findMyRanker(): Ranking;
    fire(type: string | string[], ...args: any[]): void;
    flatten(
        r: IFlatColumn[],
        offset: number,
        _levelsToGo?: number,
        _padding?: number,
    ): number;
    forward(from: IEventHandler, ...types: string[]): void;
    getColor(_row: IDataRow): string;
    getExportValue(row: IDataRow, format: "text" | "json"): any;
    getGroupRenderer(): string;
    getHeaderLabel(
        ctx: "header" | "sidePanel" | "reorder",
    ): { asHTML: boolean; content: string };
    getLabel(row: IDataRow): string;
    getMetaData(): Readonly<IColumnMetaData>;
    getNumber(row: IDataRow): number;
    getNumberFormat(): (v: number) => string;
    getRawNumber(row: IDataRow): number;
    getRenderer(): string;
    getSummaryLabel(
        ctx: "header" | "sidePanel" | "reorder",
        fallback?: boolean,
    ): { asHTML: boolean; content: string };
    getSummaryRenderer(): string;
    getValue(_row: IDataRow): any;
    getVisible(): boolean;
    getWidth(): number;
    group(_row: IDataRow, _valueCache?: any): IGroup;
    groupByMe(): boolean;
    groupSortByMe(ascending?: boolean, priority?: number): boolean;
    hide(): void;
    insertAfterMe(col: Column): boolean;
    insertBeforeMe(col: Column): boolean;
    isFiltered(): boolean;
    isGroupedBy(): number;
    isGroupSortedByMe(): { asc: "desc" | "asc"; priority: number };
    isSortedByMe(): { asc: "desc" | "asc"; priority: number };
    isVisible(): boolean;
    iterNumber(row: IDataRow): IForEachAble<number>;
    iterRawNumber(row: IDataRow): IForEachAble<number>;
    listenersChanged(_type: string, _active: boolean): void;
    markDirty(type?: "values" | "all" | "header"): void;
    nextSibling(): Column;
    on(
        type: "widthChanged",
        listener: (previous: number, current: number) => void,
    ): this;
    on(
        type: "labelChanged",
        listener: (previous: string, current: string) => void,
    ): this;
    on(
        type: "metaDataChanged",
        listener: (previous: IColumnMetaData, current: IColumnMetaData) => void,
    ): this;
    on(type: "dirty", listener: () => void): this;
    on(type: "dirtyHeader", listener: () => void): this;
    on(type: "dirtyValues", listener: () => void): this;
    on(type: "dirtyCaches", listener: () => void): this;
    on(
        type: "rendererTypeChanged",
        listener: (previous: string, current: string) => void,
    ): this;
    on(
        type: "groupRendererChanged",
        listener: (previous: string, current: string) => void,
    ): this;
    on(
        type: "summaryRendererChanged",
        listener: (previous: string, current: string) => void,
    ): this;
    on(
        type: "visibilityChanged",
        listener: (previous: boolean, current: boolean) => void,
    ): this;
    on(type: string | string[], listener: IEventListener): this;
    previousSibling(): Column;
    removeMe(): boolean;
    restore(dump: IColumnDump, _factory: ITypeFactory): void;
    setGroupRenderer(renderer: string): void;
    setMetaData(value: Readonly<IColumnMetaData>): void;
    setRenderer(renderer: string): void;
    setSummaryRenderer(renderer: string): void;
    setVisible(value: boolean): void;
    setWidth(value: number): void;
    setWidthImpl(value: number): void;
    show(): void;
    sortByMe(ascending?: boolean, priority?: number): boolean;
    toCompareGroupValue(
        _rows: ISequence<IDataRow>,
        group: IGroup,
        _valueCache?: ISequence<any>,
    ): ICompareValue | ICompareValue[];
    toCompareGroupValueType(): ECompareValueType | ECompareValueType[];
    toCompareValue(
        _row: IDataRow,
        _valueCache?: any,
    ): ICompareValue | ICompareValue[];
    toCompareValueType(): ECompareValueType | ECompareValueType[];
    toggleMyGroupSorting(): boolean;
    toggleMySorting(): boolean;
    unforward(from: IEventHandler, ...types: string[]): void;
}

Hierarchy (View Summary)

Implemented by

Properties

desc: Readonly<IColumnDesc>
parent: Readonly<IColumnParent> = null

parent column of this column, set when added to a ranking or combined column

Accessors

  • get description(): string
  • Returns string

  • get fqid(): string
  • returns the fully qualified id i.e. path the parent

    Returns string

Methods

  • dumps this column to JSON compatible format

    Parameters

    • toDescRef: (desc: any) => any

      helper mapping function

    Returns any

    dump of this column

  • visitor pattern for flattening the columns

    Parameters

    • r: IFlatColumn[]

      the result array

    • offset: number

      left offset

    • _levelsToGo: number = 0

      how many levels down

    • _padding: number = 0

      padding between columns

    Returns number

    the used width by this column

  • forwards one or more events from a given dispatcher to the current one i.e. when one of the given events is fired in 'from' it will be forwarded to all my listeners

    Parameters

    • from: IEventHandler

      the event dispatcher to forward from

    • ...types: string[]

      the event types to forward

    Returns void

  • Parameters

    • ctx: "header" | "sidePanel" | "reorder"

    Returns { asHTML: boolean; content: string }

  • return the label of a given row for the current column

    Parameters

    Returns string

    the label of this column at the specified row

  • determines the renderer type that should be used to render this column. By default the same type as the column itself

    Returns string

  • Parameters

    • ctx: "header" | "sidePanel" | "reorder"
    • fallback: boolean = false

    Returns { asHTML: boolean; content: string }

  • Parameters

    • ascending: boolean = ...
    • priority: number = 0

    Returns boolean

  • helper function that will be called upon a listener has changed

    Parameters

    • _type: string

      event type

    • _active: boolean

      registered or de registered

    Returns void

  • marks the header, values, or both as dirty such that the values are reevaluated

    Parameters

    • type: "values" | "all" | "header" = 'all'

      specify in more detail what is dirty, by default whole column

    Returns void

  • Parameters

    • type: "widthChanged"
    • listener: (previous: number, current: number) => void
        • (previous: number, current: number): void
        • emitted when the width property changes

          Parameters

          • previous: number
          • current: number

          Returns void

          Column

    Returns this

  • Parameters

    • type: "labelChanged"
    • listener: (previous: string, current: string) => void
        • (previous: string, current: string): void
        • emitted when the label property changes

          Parameters

          • previous: string
          • current: string

          Returns void

          Column

    Returns this

  • Parameters

    Returns this

  • Parameters

    • type: "dirty"
    • listener: () => void
        • (): void
        • emitted when state of the column is dirty

          Returns void

          Column

    Returns this

  • Parameters

    • type: "dirtyHeader"
    • listener: () => void
        • (): void
        • emitted when state of the column related to its header is dirty

          Returns void

          Column

    Returns this

  • Parameters

    • type: "dirtyValues"
    • listener: () => void
        • (): void
        • emitted when state of the column related to its values is dirty

          Returns void

          Column

    Returns this

  • Parameters

    • type: "dirtyCaches"
    • listener: () => void
        • (): void
        • emitted when state of the column related to cached values (hist, compare, ...) is dirty

          Returns void

          Column

    Returns this

  • Parameters

    • type: "rendererTypeChanged"
    • listener: (previous: string, current: string) => void
        • (previous: string, current: string): void
        • emitted when the renderer type property changes

          Parameters

          • previous: string
          • current: string

          Returns void

          Column

    Returns this

  • Parameters

    • type: "groupRendererChanged"
    • listener: (previous: string, current: string) => void
        • (previous: string, current: string): void
        • emitted when the group renderer property changes

          Parameters

          • previous: string
          • current: string

          Returns void

          Column

    Returns this

  • Parameters

    • type: "summaryRendererChanged"
    • listener: (previous: string, current: string) => void
        • (previous: string, current: string): void
        • emitted when the pattern property changes

          Parameters

          • previous: string
          • current: string

          Returns void

          Column

    Returns this

  • Parameters

    • type: "visibilityChanged"
    • listener: (previous: boolean, current: boolean) => void
        • (previous: boolean, current: boolean): void
        • emitted when the visibility of this column changes

          Parameters

          • previous: boolean
          • current: boolean

          Returns void

          Column

    Returns this

  • Parameters

    Returns this

  • triggers that the ranking is sorted by this column

    Parameters

    • ascending: boolean = ...

      ascending order?

    • priority: number = 0

      sorting priority

    Returns boolean

    was successful