StyledColumn

View as Markdown

One column drawn with a Styled Column.

Set exactly one of GradientStyle, PercentBarStyle, BulletChartStyle, RangeBarStyle, RatingStyle, IconStyle, BadgeStyle or SparklineStyle. The Settings Panel edits them as alternatives and clears the others when the type changes.

If a cell-renderer style is combined with another, AdapTable uses the first match in this order: Percent Bar, Bullet Chart, Range Bar, Rating, Icon, Badge, Sparkline. GradientStyle is the cell background rather than a replacement renderer, so it still paints when it is set.

Suspend with IsSuspended (inherited from ). A suspended Styled Column is kept in state and is not drawn.

TypeScript
export interface StyledColumn extends
Extends

SuspendableObject

Properties

PropertyTypeDescription
BadgeStyleBadgeStyleAny column. Draws the cell value as a pill. A numberArray or textArray column draws one pill per element; other array types are drawn as a single value.

Badges is the list of pill definitions. A Rule is an AdapTableQL boolean expression, evaluated per cell (and per element on a number or text array). Rules are tried in list order and the first match wins. A badge with no Rule is the fallback when no rule matches; if several have no rule, the first of those is used. Density, Spacing and OverflowMode (Truncate, Wrap or Scroll) apply to the whole column.
BulletChartStyleBulletChartStyleNumeric column. Draws a bullet chart in the cell: the value as a bar, a target as a marker, and optional qualitative bands behind the bar.

CellRanges colours those background bands (poor / ok / good). They are not a colour switch for the bar itself, which is what Percent Bar uses CellRanges for. TargetProperties supplies the target. Orientation is Horizontal (the default) or Vertical; a vertical chart needs a tall row.
ColumnIdstringcolId of the column this style draws.

AdapTable uses the first Styled Column with this ColumnId.
GradientStyleGradientStyleNumeric column. Tints the cell background by where the value sits in a range.

The cell text stays. Set CellRanges for bands (a traffic-light scale), or ZeroCentred for a diverging colour either side of 0. ColumnComparison measures this cell against another column. RangeValueType is Number (the default) or Percentage (0–100).
IconStyleIconStyleScalar column. Looks the cell value up in Mappings (and an optional Preset) and draws the matching icon.

Array columns are not supported; use BadgeStyle to draw one glyph per array element. Preset is Flags, Currencies, Trend or Status. MatchMode is Exact (the default) or CaseInsensitive. When nothing matches, FallbackProperties.Mode is Hide (the default), ShowText or Icon.
NamestringName shown in the Settings Panel and used by styledColumnApi to find this definition.

Unique among Styled Columns.
PercentBarStylePercentBarStyleNumeric column. Draws a bar whose length is the cell value on the column's scale.

CellRanges colours the bar by which band the value falls in. Origin is where the bar grows from: Auto (the default), Zero, Min, or a fixed number. ColumnComparison measures the cell against another column.
RangeBarStyleRangeBarStyleNumeric column. Draws a track from Min to Max and a marker at the cell value.

Min and Max are required. Each can be a number, another column's colId (that row's value), or Col-Min, Col-Max, Col-Avg or Col-Median across the visible rows. Reference is an optional second marker (a target or a previous close). CellRanges draws background bands on the track.
RatingStyleRatingStyleNumeric column. Draws a row of icons (stars by default) filled in proportion to the cell value.

Max is both the number of icons and the top of the scale, in the same units as the cell value. The default is 5, so a value of 4 fills four of five stars. The value is clamped to [0, Max]. AllowHalf (the default) fills the boundary icon by the fraction; otherwise the value rounds to a whole icon. Icon is Star, Heart, Circle or Thumb.
RowScopeRowScopeWhich row kinds draw the style: data (leaf) rows, group rows, summary rows and grand-total rows.

Each Exclude* flag turns that kind off. When RowScope is omitted, Badge draws on every row kind and every other style draws on every kind except group rows.

Sparkline ignores this for non-data rows: it only draws on leaf rows, because the cell value has to be the array of points.
SparklineStyleSparklineStyleNumeric-array column. The cell value is the series, and AG Grid's sparkline renderer draws it.

options is an AG Charts sparkline options object (type: 'line', 'bar', 'area' or 'column'). Only leaf data rows are drawn.
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedbooleanSuspends (i.e. turns off) an Adaptable Object

Property Details

BadgeStyle

Any column. Draws the cell value as a pill. A numberArray or textArray column draws one pill per element; other array types are drawn as a single value.

Badges is the list of pill definitions. A Rule is an AdapTableQL boolean expression, evaluated per cell (and per element on a number or text array). Rules are tried in list order and the first match wins. A badge with no Rule is the fallback when no rule matches; if several have no rule, the first of those is used. Density, Spacing and OverflowMode (Truncate, Wrap or Scroll) apply to the whole column.

TypeScript
BadgeStyle?: BadgeStyle;
Property Value

BadgeStyle

BulletChartStyle

Numeric column. Draws a bullet chart in the cell: the value as a bar, a target as a marker, and optional qualitative bands behind the bar.

CellRanges colours those background bands (poor / ok / good). They are not a colour switch for the bar itself, which is what Percent Bar uses CellRanges for. TargetProperties supplies the target. Orientation is Horizontal (the default) or Vertical; a vertical chart needs a tall row.

TypeScript
BulletChartStyle?: BulletChartStyle;
Property Value

BulletChartStyle

ColumnId

colId of the column this style draws.

AdapTable uses the first Styled Column with this ColumnId.

TypeScript
ColumnId: string;
Property Value

string

GradientStyle

Numeric column. Tints the cell background by where the value sits in a range.

The cell text stays. Set CellRanges for bands (a traffic-light scale), or ZeroCentred for a diverging colour either side of 0. ColumnComparison measures this cell against another column. RangeValueType is Number (the default) or Percentage (0–100).

TypeScript
GradientStyle?: GradientStyle;
Property Value

GradientStyle

IconStyle

Scalar column. Looks the cell value up in Mappings (and an optional Preset) and draws the matching icon.

Array columns are not supported; use BadgeStyle to draw one glyph per array element. Preset is Flags, Currencies, Trend or Status. MatchMode is Exact (the default) or CaseInsensitive. When nothing matches, FallbackProperties.Mode is Hide (the default), ShowText or Icon.

TypeScript
IconStyle?: IconStyle;
Property Value

IconStyle

Name

Name shown in the Settings Panel and used by styledColumnApi to find this definition.

Unique among Styled Columns.

TypeScript
Name: string;
Property Value

string

PercentBarStyle

Numeric column. Draws a bar whose length is the cell value on the column's scale.

CellRanges colours the bar by which band the value falls in. Origin is where the bar grows from: Auto (the default), Zero, Min, or a fixed number. ColumnComparison measures the cell against another column.

TypeScript
PercentBarStyle?: PercentBarStyle;
Property Value

PercentBarStyle

RangeBarStyle

Numeric column. Draws a track from Min to Max and a marker at the cell value.

Min and Max are required. Each can be a number, another column's colId (that row's value), or Col-Min, Col-Max, Col-Avg or Col-Median across the visible rows. Reference is an optional second marker (a target or a previous close). CellRanges draws background bands on the track.

TypeScript
RangeBarStyle?: RangeBarStyle;
Property Value

RangeBarStyle

RatingStyle

Numeric column. Draws a row of icons (stars by default) filled in proportion to the cell value.

Max is both the number of icons and the top of the scale, in the same units as the cell value. The default is 5, so a value of 4 fills four of five stars. The value is clamped to [0, Max]. AllowHalf (the default) fills the boundary icon by the fraction; otherwise the value rounds to a whole icon. Icon is Star, Heart, Circle or Thumb.

TypeScript
RatingStyle?: RatingStyle;
Property Value

RatingStyle

RowScope

Which row kinds draw the style: data (leaf) rows, group rows, summary rows and grand-total rows.

Each Exclude* flag turns that kind off. When RowScope is omitted, Badge draws on every row kind and every other style draws on every kind except group rows.

Sparkline ignores this for non-data rows: it only draws on leaf rows, because the cell value has to be the array of points.

TypeScript
RowScope?: RowScope;
Property Value

RowScope

SparklineStyle

Numeric-array column. The cell value is the series, and AG Grid's sparkline renderer draws it.

options is an AG Charts sparkline options object (type: 'line', 'bar', 'area' or 'column'). Only leaf data rows are drawn.

TypeScript
SparklineStyle?: SparklineStyle;
Property Value

SparklineStyle

IsSuspended

Inherited from SuspendableObject

Suspends (i.e. turns off) an Adaptable Object

TypeScript
IsSuspended?: boolean;
Property Value

boolean

IsReadOnly

Inherited from AdaptableObject

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

TypeScript
IsReadOnly?: boolean;
Property Value

boolean