Feature request: add argument to data_color
that truncates values outside of the domain instead of setting them to nan
#430
Labels
Currently, values that are outside the prescribed
domain
are going to be treated like nan/null values insidedata_color
:(ref: https://posit-dev.github.io/great-tables/reference/GT.html#great_tables.GT.data_color)
I think it would be a useful feature to allow a flag that enables a different behavior: Instead of treating the values as nan/null, they should be truncated to the min/max values of the domain. E.g.:
Then the entries
65100.0
and1325.81
would get the same color as a value of50
.If this is a feature that makes sense, the
_rescale_numeric
could be a good place to add this to.great-tables/great_tables/_data_color/base.py
Line 572 in 11660a6
The change could look like this:
The text was updated successfully, but these errors were encountered: