finos / perspective

A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
https://perspective.finos.org/
Apache License 2.0
7.72k stars 1.05k forks source link

Conditional cell formatting #2559

Closed lmeyerov closed 2 months ago

lmeyerov commented 3 months ago

Feature Request

We would like to be able to define conditional formatting on cells within a column. For example, when a column has certain string values, change the background, foreground colors, and font family/size/weight/decoration. Same but different for value ranges, like being below some threshold.

Tools like Google Sheets call this conditional formatting afaict.

Description of Problem:

We are trying to make certain categorical and continuous columns easier to read , such as risk scores and error values

Potential Solutions:

We can provide a sequence of formulas for whether a cell in a column being conditionally formatted should trigger, and for each formula, a corresponding css class name or style object. The first format registered to match a cell is the one to that gets picked.

Later, a UI-editable version.

timkpaine commented 2 months ago

https://github.com/finos/perspective/discussions/1510#discussioncomment-1146608