You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2023/08/24 14:01:47 UTC
[superset] branch master updated: fix(table): condition formatting can't formate 0 values (#24008)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 0d5be8e3f6 fix(table): condition formatting can't formate 0 values (#24008)
0d5be8e3f6 is described below
commit 0d5be8e3f6c0b1ca62bf52fe933bc516d2f509e0
Author: Stepan <66...@users.noreply.github.com>
AuthorDate: Thu Aug 24 17:01:40 2023 +0300
fix(table): condition formatting can't formate 0 values (#24008)
---
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
index fd5ce8aa3e..72bcb71d29 100644
--- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
+++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
@@ -461,9 +461,10 @@ export default function TableChart<D extends DataRecord = DataRecord>(
columnColorFormatters!
.filter(formatter => formatter.column === column.key)
.forEach(formatter => {
- const formatterResult = value
- ? formatter.getColorFromValue(value as number)
- : false;
+ const formatterResult =
+ value || value === 0
+ ? formatter.getColorFromValue(value as number)
+ : false;
if (formatterResult) {
backgroundColor = formatterResult;
}