mirror of https://github.com/apache/superset.git
fix: revert handle null values in time-series table (#18684)
This commit is contained in:
parent
a7d505db41
commit
35684c54b3
|
@ -192,17 +192,14 @@ const TimeTable = ({
|
|||
} else {
|
||||
v = reversedEntries[timeLag][valueField];
|
||||
}
|
||||
if (typeof v === 'number' || typeof recent === 'number') {
|
||||
if (column.comparisonType === 'diff') {
|
||||
v = recent - v;
|
||||
} else if (column.comparisonType === 'perc') {
|
||||
v = recent / v;
|
||||
} else if (column.comparisonType === 'perc_change') {
|
||||
v = recent / v - 1;
|
||||
}
|
||||
} else {
|
||||
v = 'N/A';
|
||||
if (column.comparisonType === 'diff') {
|
||||
v = recent - v;
|
||||
} else if (column.comparisonType === 'perc') {
|
||||
v = recent / v;
|
||||
} else if (column.comparisonType === 'perc_change') {
|
||||
v = recent / v - 1;
|
||||
}
|
||||
v = v || 0;
|
||||
} else if (column.colType === 'contrib') {
|
||||
// contribution to column total
|
||||
v =
|
||||
|
|
Loading…
Reference in New Issue