fix(TableChart): render cell bars for columns with NULL values (#36819)

This commit is contained in:
Luis Sánchez
2025-12-31 11:51:35 -03:00
committed by GitHub
parent 85e830de46
commit c31224c891
3 changed files with 90 additions and 6 deletions

View File

@@ -385,7 +385,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
const nums = data
?.map(row => row?.[key])
.filter(value => typeof value === 'number') as number[];
if (data && nums.length === data.length) {
if (nums.length > 0) {
return (
alignPositiveNegative
? [0, d3Max(nums.map(Math.abs))]
@@ -958,6 +958,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
display: block;
top: 0;
${valueRange &&
typeof value === 'number' &&
`
width: ${`${cellWidth({
value: value as number,