Skip to content

Commit

Permalink
fix: heatmap errors with null data
Browse files Browse the repository at this point in the history
  • Loading branch information
Michelle Thomas authored and zhaoyongjie committed Nov 26, 2021
1 parent 1d4e5c0 commit bfc5178
Show file tree
Hide file tree
Showing 2 changed files with 209 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ function Heatmap(element, props) {

for (let i = 0; i < records.length; i++) {
const datum = records[i];
longestX = Math.max(longestX, datum.x.toString().length || 1);
longestY = Math.max(longestY, datum.y.toString().length || 1);
longestX = Math.max(longestX, (datum.x && datum.x.toString().length) || 1);
longestY = Math.max(longestY, (datum.y && datum.y.toString().length) || 1);
}

if (leftMargin === 'auto') {
Expand Down
Loading

0 comments on commit bfc5178

Please sign in to comment.