Skip to content

Commit

Permalink
stop filling new [] in pie defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcjohnson committed Feb 8, 2018
1 parent 3178b2e commit 564dff6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/traces/pie/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = function calc(gd, trace) {
var vals = trace.values;
var hasVals = Array.isArray(vals) && vals.length;
var labels = trace.labels;
var colors = trace.marker.colors;
var colors = trace.marker.colors || [];
var cd = [];
var fullLayout = gd._fullLayout;
var colorWay = fullLayout.colorway;
Expand Down
3 changes: 1 addition & 2 deletions src/traces/pie/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
var lineWidth = coerce('marker.line.width');
if(lineWidth) coerce('marker.line.color');

var colors = coerce('marker.colors');
if(!Array.isArray(colors)) traceOut.marker.colors = [];
coerce('marker.colors');

coerce('scalegroup');
// TODO: hole needs to be coerced to the same value within a scaleegroup
Expand Down

1 comment on commit 564dff6

@etpinard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice. I think Ben opened an issue asking for this a couple months back

Please sign in to comment.