evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
4.15k stars 197 forks source link

Custom Color Scales for Conditional Formatting in Data Tables #1838

Closed mjbloch closed 5 months ago

mjbloch commented 5 months ago

Feature Description

In Data Tables, would like the ability to pass in a custom list of colors to define the conditional formatting color scale (contentType=colorscale). E.g colors={['#12da42', '#00000' , '#232323']}.

Goal of Feature

Allow for greater freedom, flexibility, and customization of data tables. Would enable so many great formats, such as green-to-red scales and inverted color scales (i.e. min is darker shade, while max is white). Current conditional formatting is somewhat limited with single colors and max always being the darker shade.

Current Solution / Workarounds

No current workarounds.

Alternatives

N/A

hughess commented 5 months ago

This one is very close! #1840

mjbloch commented 5 months ago

This looks incredible @hughess! You are a rockstar! Can't believe how fast your turned this around!

hughess commented 5 months ago

Closed by #1840!