Class CategoricalsColumn

a string column with optional alignment

Hierarchy (view full)

Implements

Constructors

Properties

categories: ICategory[]
desc: Readonly<IColumnDesc>
parent: Readonly<IColumnParent> = null

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

EVENT_COLOR_MAPPING_CHANGED: "colorMappingChanged" = CategoricalColumn.EVENT_COLOR_MAPPING_CHANGED
EVENT_DATA_LOADED: "dataLoaded" = 'dataLoaded'
EVENT_DIRTY: "dirty" = 'dirty'
EVENT_DIRTY_CACHES: "dirtyCaches" = 'dirtyCaches'
EVENT_DIRTY_HEADER: "dirtyHeader" = 'dirtyHeader'
EVENT_DIRTY_VALUES: "dirtyValues" = 'dirtyValues'
EVENT_GROUP_RENDERER_TYPE_CHANGED: "groupRendererChanged" = 'groupRendererChanged'
EVENT_LABEL_CHANGED: "labelChanged" = 'labelChanged'
EVENT_METADATA_CHANGED: "metaDataChanged" = 'metaDataChanged'
EVENT_RENDERER_TYPE_CHANGED: "rendererTypeChanged" = 'rendererTypeChanged'
EVENT_SUMMARY_RENDERER_TYPE_CHANGED: "summaryRendererChanged" = 'summaryRendererChanged'
EVENT_VISIBILITY_CHANGED: "visibilityChanged" = 'visibilityChanged'
EVENT_WIDTH_CHANGED: "widthChanged" = 'widthChanged'
FLAT_ALL_COLUMNS: -1 = -1

magic variable for showing all columns

RENDERER_LOADING: "loading" = 'loading'

Accessors

  • get dataLength(): number
  • Returns number

  • get description(): string
  • Returns string

  • get fixed(): boolean
  • Returns boolean

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

    Returns string

  • get fqpath(): string
  • Returns string

  • get frozen(): boolean
  • Returns boolean

  • get id(): string
  • Returns string

  • get label(): string
  • Returns string

  • get labels(): string[]
  • Returns string[]

Methods

  • Parameters

    • idGenerator: (() => string)
        • (): string
        • Returns string

    Returns void

  • clear the filter

    Returns boolean

    whether the filtered needed to be reset

  • called when the column is removed from the ranking

    Returns void

  • patch the dump such that the loaded attribute is defined (for lazy loading columns)

    Parameters

    • toDescRef: ((desc) => any)
        • (desc): any
        • Parameters

          • desc: any

          Returns any

    Returns any

  • predicate whether the current row should be included

    Parameters

    Returns boolean

  • 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

    • Rest ...types: string[]

      the event types to forward

    Returns void

  • returns the value to be used when exporting

    Parameters

    • row: IDataRow
    • format: "text" | "json"

      format hint

    Returns any

  • Parameters

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

    Returns {
        asHTML: boolean;
        content: string;
    }

    • 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

  • Parameters

    Returns {
        key: string;
        value: string;
    }[]

  • Parameters

    Returns {
        key: string;
        value: string;
    }[]

  • 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;
    }

    • asHTML: boolean
    • content: string
  • return the value of a given row for the current column

    Parameters

    Returns string[]

    the value of this column at the specified row

  • Parameters

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

    Returns boolean

  • inserts the given column after itself

    Parameters

    • col: Column

      the column to insert

    Returns boolean

    was successful

  • inserts the given column before itself

    Parameters

    • col: Column

      the column to insert

    Returns boolean

    was successful

  • Returns {
        asc: "desc" | "asc";
        priority: number;
    }

    • asc: "desc" | "asc"
    • priority: number
  • Returns {
        asc: "desc" | "asc";
        priority: number;
    }

    • asc: "desc" | "asc"
    • priority: number
  • 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

    Returns this

  • Parameters

    • type: "dataLoaded"
    • listener: ((previous, current) => void)
        • (previous, current): void
        • emitted when the data of this column has been loaded

          Parameters

          • previous: boolean
          • current: boolean

          Returns void

          As Member Of

          ValueColumn

          Group

          Events

    Returns this

  • Parameters

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

          Parameters

          • previous: number
          • current: number

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Parameters

          • previous: string
          • current: string

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

    • type: "metaDataChanged"
    • listener: ((previous, current) => void)
        • (previous, current): void
        • emitted when the meta data property changes

          Parameters

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Parameters

          • previous: string
          • current: string

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Parameters

          • previous: string
          • current: string

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Parameters

          • previous: string
          • current: string

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

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

          Parameters

          • previous: boolean
          • current: boolean

          Returns void

          As Member Of

          Column

          Group

          Events

    Returns this

  • Parameters

    Returns this

  • removes the column from the ranking

    Returns boolean

    was successful

  • triggers that the ranking is sorted by this column

    Parameters

    • ascending: boolean = ...

      ascending order?

    • priority: number = 0

      sorting priority

    Returns boolean

    was successful

  • toggles the sorting order of this column in the ranking

    Returns boolean

    was successful