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