Skip to content

Commit 67ddd7a

Browse files
authored
Merge pull request #6893 from robbtraister/fix-textinfo-NPE
Fix resizing `pie` like traces when `textinfo` is set to "none"
2 parents cf8bfad + 3a9aa1b commit 67ddd7a

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

draftlogs/6893_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix possible NPE when `textinfo: "none"` for pie and funnelarea traces

src/traces/funnelarea/defaults.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
5555
moduleHasTextangle: false,
5656
moduleHasInsideanchor: false
5757
});
58+
} else if(textInfo === 'none') {
59+
coerce('textposition', 'none');
5860
}
5961

6062
handleDomainDefaults(traceOut, layout, coerce);

src/traces/pie/defaults.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
111111
if(textposition === 'inside' || textposition === 'auto' || Array.isArray(textposition)) {
112112
coerce('insidetextorientation');
113113
}
114+
} else if(textInfo === 'none') {
115+
coerce('textposition', 'none');
114116
}
115117

116118
handleDomainDefaults(traceOut, layout, coerce);

0 commit comments

Comments
 (0)