Skip to content

Commit

Permalink
Merge pull request #6893 from robbtraister/fix-textinfo-NPE
Browse files Browse the repository at this point in the history
Fix resizing `pie` like traces when `textinfo` is set to "none"
  • Loading branch information
archmoj authored Mar 6, 2024
2 parents cf8bfad + 3a9aa1b commit 67ddd7a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions draftlogs/6893_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix possible NPE when `textinfo: "none"` for pie and funnelarea traces
2 changes: 2 additions & 0 deletions src/traces/funnelarea/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
moduleHasTextangle: false,
moduleHasInsideanchor: false
});
} else if(textInfo === 'none') {
coerce('textposition', 'none');
}

handleDomainDefaults(traceOut, layout, coerce);
Expand Down
2 changes: 2 additions & 0 deletions src/traces/pie/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
if(textposition === 'inside' || textposition === 'auto' || Array.isArray(textposition)) {
coerce('insidetextorientation');
}
} else if(textInfo === 'none') {
coerce('textposition', 'none');
}

handleDomainDefaults(traceOut, layout, coerce);
Expand Down

0 comments on commit 67ddd7a

Please sign in to comment.