Skip to content

Commit 1cce254

Browse files
piePattern : add md & fix reference to colors
only reference traceIn.marker.colors if traceIn.marker exists
1 parent 342bd09 commit 1cce254

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

draftlogs/6601_add.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- add pattern to pie trace type [[#6601](https://github.com/plotly/plotly.js/pull/6601)]

src/traces/pie/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
6868
var markerColors = coerce('marker.colors');
6969
coercePattern(coerce, 'marker.pattern', markerColors);
7070
// push the marker colors (with s) to the foreground colors, to work around logic in the drawing pattern code on marker.color (without s, which is okay for a bar trace)
71-
if(!traceOut.marker.pattern.fgcolor) traceOut.marker.pattern.fgcolor = traceIn.marker.colors;
71+
if(!traceOut.marker.pattern.fgcolor && traceIn.marker !== undefined) traceOut.marker.pattern.fgcolor = traceIn.marker.colors;
7272
if(!traceOut.marker.pattern.bgcolor) traceOut.marker.pattern.bgcolor = layout.paper_bgcolor;
7373

7474
coerce('scalegroup');

0 commit comments

Comments
 (0)