Skip to content

Commit 53f3712

Browse files
editType calc & default no coloring
1 parent 12cd7e6 commit 53f3712

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/traces/sunburst/attributes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@ module.exports = {
220220
valType: 'color',
221221
editType: 'style',
222222
role: 'style',
223-
dflt: null, // rgba(0,0,0,0),
223+
dflt: 'rgba(0,0,0,0)',
224224
description: [
225225
'sets the color of the root node for a sunburst or a treemap trace.'
226226
].join(' ')
227227
},
228-
editType: 'plot'
228+
editType: 'calc'
229229
},
230230

231231
domain: domainAttrs({name: 'sunburst', trace: true, editType: 'calc'})

src/traces/sunburst/calc.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,8 @@ exports._runCrossTraceCalc = function(desiredType, gd) {
276276
dfltColorCount++;
277277
}
278278
} else {
279-
// root gets no coloring by default
280-
cdi.color = 'rgba(0,0,0,0)';
281-
if(cdi.trace.root) {
282-
cdi.color = cdi.trace.root.color;
283-
}
279+
// set root color. no coloring by default.
280+
cdi.color = cdi.trace.root.color;
284281
}
285282
}
286283
}

0 commit comments

Comments
 (0)