Skip to content

Commit a683c2a

Browse files
piePattern : extra check on trace.marker.pattern
The styleOne function is also used by the funnelarea trace type, which has no pattern in it's schema at the moment, so extra check if pattern exists, before checking if a shape exists within the pattern.
1 parent e40e078 commit a683c2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/pie/style_one.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function styleOne(s, pt, trace, gd) {
2525
// enforce the point color, when colors (with s) & the pattern shape are missing.
2626
// 'abuse' the color attribute, used in the Drawing component for bar trace type.
2727
// alternative could be to pass the point color as an extra parameter in pointStyle
28-
if(!trace.marker.colors && !trace.marker.pattern.shape) trace.marker.color = pt.color;
28+
if(!trace.marker.colors && trace.marker.pattern && !trace.marker.pattern.shape) trace.marker.color = pt.color;
2929

3030
Drawing.pointStyle(s, trace, gd);
3131
// to do : push into s.style d3 logic

0 commit comments

Comments
 (0)