Styled Columns in AdapTable

Summary

  • AdapTable provides 4 Styled Columns which render a Column with a complex Style:
    • Gradient Column
    • Percent Bar
    • Badge
    • Sparkline Column

Styled Columns enable Users to visualise the data in a given column in sophisticated and powerful ways.

They are designed to enable complicated styles to be defined with just a few clicks / properties, while providing a very striking visual effect. They are designed to enable complicated styles to be defined with just a few clicks / properties, while providing a very striking visual effect.

There are 4 Styled Columns provided by AdapTable:

Styled ColumnColumn Data TypeDescription
Gradient ColumnNumericShows Cell's values as a Gradient
Percent BarNumericCreates a bar in Column, where width is based on cell value
BadgeNumeric & StringRenders Badges in Column (with optional Icons)
SparklineNumeric ArrayRenders a Sparkline Chart in each Column cell

Note

The Checkbox Column Style was removed in Version 16 when AG Grid v.30 provided similar functionality natively

Deep Dive

How Styled Columns Work in AdapTable

Styled Columns
Fork
  • This example shows the 4 different Styled Columns provided by AdapTable (see other pages in this section for more information):s

Expand to see the Styled Column Definitions

Gradient Style

The Gradient Style will colour numeric cells by comparing their value against a maximum value.

This maximum value can be the highest value in the Column or in a given Range.

Hint

  • Gradients can be reversed so the colour is lighter (rather than darker) the nearer it is to the max value
  • This is particularly useful when styling columns that contain negative numbers

Find Out More

See more informations and demos at Guide to using a Gradient Style

Percent Bar Style

In the Percent Bar Style each cell in the numeric column displays as a relatively sized bar.

Like Gradient Styles, Percent Bar Styles can include multiple Ranges.

Each bar is evaluated using either the cell's actual value or its relative percentage value.

Percent Bars can additionally be styled to show the a back colour, the Cell's Text or a Tooltip.

Find Out More

The Guide to using a Percent Bar contains more information and many demos

Badge Style

In the Badge Style each cell in a column can be rendered as a Badge.

A Badge can include the Cell Text, or an Icon or both.

Rules (using Predicates) can be provided to determine whether the Badge is displayed.

Hint

This allows you to provide multiple different badge styles for a column depending on the cell value

Find Out More

The Guide to using a Badge contains more information and many demos

Sparkline Column

The Sparkline Column style enables columns to be displayed as an AG Grid sparkline.

These are array columns - typically numeric, but objects can also be provided.

Find Out More

Using Styled Columns

Run-time users are able to add, edit, share, suspend and delete Styled Columns using the Styled Column section in the Settings Panel.

Find Out More

The Gradient, Percent Bar, Badge and Sparkline Column pages contain instructions on using the respective Wizards

Column Menu

A Menu Item in the Column Menu enables Styled Columns to be created and edited using the relevant wizard.

Deep Dive

Styled Column Menu Entries

UI Entitlements

The UI Entitlements behaviour for Styled Columns is as expected for Full and Hidden Access Levels.

The ReadOnly Entitlement behaviour is that the Styled Columns will still be rendered but Users are not permitted to manage or suspend them.

AdapTable's Styled Columns

(Recorded with AdapTable v16.0)

FAQ

Can I merge Gradient and Percent Bar styles for the same column? No, all Styled Columns are distinct. Gradients and Percent Bars provide different ways to display column data and each has a separate implementation. Although both share common properties and features (like Ranges), you need to choose one or the other. However most Styled Columns will get any format for the Cell Value from any existing Column Formatting.

Why is the Percent Bar (or Gradient Column) not being applied in Aggregated values? Only Badge Styles are rendered in Grouped Rows and Row Summaries. It doesn't make sense to include Percent Bars and Gradient Columns as they are not part of the min / max calculation.