@@ -4,6 +4,7 @@ var d3 = require('@plotly/d3');
44var Color = require ( '../../components/color' ) ;
55var Lib = require ( '../../lib' ) ;
66var resizeText = require ( '../bar/uniform_text' ) . resizeText ;
7+ var fillOne = require ( '../sunburst/fill_one' ) ;
78
89function style ( gd ) {
910 var s = gd . _fullLayout . _iciclelayer . selectAll ( '.trace' ) ;
@@ -17,20 +18,20 @@ function style(gd) {
1718 gTrace . style ( 'opacity' , trace . opacity ) ;
1819
1920 gTrace . selectAll ( 'path.surface' ) . each ( function ( pt ) {
20- d3 . select ( this ) . call ( styleOne , pt , trace ) ;
21+ d3 . select ( this ) . call ( styleOne , pt , trace , gd ) ;
2122 } ) ;
2223 } ) ;
2324}
2425
25- function styleOne ( s , pt , trace ) {
26+ function styleOne ( s , pt , trace , gd ) {
2627 var cdi = pt . data . data ;
2728 var isLeaf = ! pt . children ;
2829 var ptNumber = cdi . i ;
2930 var lineColor = Lib . castOption ( trace , ptNumber , 'marker.line.color' ) || Color . defaultLine ;
3031 var lineWidth = Lib . castOption ( trace , ptNumber , 'marker.line.width' ) || 0 ;
3132
32- s . style ( 'stroke-width' , lineWidth )
33- . call ( Color . fill , cdi . color )
33+ s . call ( fillOne , pt , trace , gd )
34+ . style ( 'stroke-width' , lineWidth )
3435 . call ( Color . stroke , lineColor )
3536 . style ( 'opacity' , isLeaf ? trace . leaf . opacity : null ) ;
3637}
0 commit comments