mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(table-chart): don't color empty cells in table chart with color formatters (#21501)
This commit is contained in:
@@ -415,9 +415,9 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
||||
columnColorFormatters!
|
||||
.filter(formatter => formatter.column === column.key)
|
||||
.forEach(formatter => {
|
||||
const formatterResult = formatter.getColorFromValue(
|
||||
value as number,
|
||||
);
|
||||
const formatterResult = value
|
||||
? formatter.getColorFromValue(value as number)
|
||||
: false;
|
||||
if (formatterResult) {
|
||||
backgroundColor = formatterResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user