Skip to main content

ColumnColorHelper

Defined in: src/dataframe/column-helpers.ts:48

Constructors

Constructor

new ColumnColorHelper(column): ColumnColorHelper

Defined in: src/dataframe/column-helpers.ts:51

Parameters

ParameterType
columnColumn

Returns

ColumnColorHelper

Methods

getColor()

getColor(i): number

Defined in: src/dataframe/column-helpers.ts:128

Parameters

ParameterType
inumber

Returns

number


getColors()

getColors(): Uint32Array

Defined in: src/dataframe/column-helpers.ts:132

Returns

Uint32Array


getType()

getType(): "Categorical" | "Conditional" | "Linear" | "Off"

Defined in: src/dataframe/column-helpers.ts:55

Returns

"Categorical" | "Conditional" | "Linear" | "Off"


setCategorical()

setCategorical(colorMap?, options?): void

Defined in: src/dataframe/column-helpers.ts:103

Parameters

ParameterTypeDefault value
colorMap{ } | nullnull
options{ fallbackColor: string | number; matchType?: MatchType; } | nullnull

Returns

void


setConditional()

setConditional(rules?): void

Defined in: src/dataframe/column-helpers.ts:113

Parameters

ParameterTypeDefault value
rules{[index: string]: string | number; } | nullnull

Returns

void


setDisabled()

setDisabled(): void

Defined in: src/dataframe/column-helpers.ts:124

Returns

void


setLinear()

setLinear(range?, options?): void

Defined in: src/dataframe/column-helpers.ts:75

Enables linear color-coding on a column.

Parameters

ParameterTypeDefault valueDescription
rangenumber[] | nullnulllist of palette colors (ARGB integers; see Color).
options{ aboveMaxColor?: string; belowMinColor?: string; max?: number; min?: number; } | nullnulllist of additional parameters, such as the minimum/maximum value to be used for scaling and the colors for values below the minimum and above the maximum. Use the same numeric representation as [Column.min] and [Column.max].

Returns

void


setLinearAbsolute()

setLinearAbsolute(valueColors, options?): void

Defined in: src/dataframe/column-helpers.ts:92

Enables linear color-coding on a column with absolute values.

Parameters

ParameterTypeDefault valueDescription
valueColors{[value: number]: string; }undefineddictionary of numerical values and hex-colors.
options{ aboveMaxColor?: string; belowMinColor?: string; } | nullnulllist of additional parameters, such as the colors for values below the minimum and above the maximum. See samples: https://public.datagrok.ai/js/samples/grid/color-coding/color-coding}

Returns

void