File tree 1 file changed +5
-12
lines changed
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -24,24 +24,17 @@ module.exports = function plot(gd, cdpie) {
24
24
25
25
scalePies ( cdpie , fullLayout . _size ) ;
26
26
27
- var pieGroups = fullLayout . _pielayer . selectAll ( 'g.trace' ) . data ( cdpie ) ;
28
-
29
- pieGroups . enter ( ) . append ( 'g' )
30
- . attr ( {
31
- 'stroke-linejoin' : 'round' , // TODO: miter might look better but can sometimes cause problems
32
- // maybe miter with a small-ish stroke-miterlimit?
33
- 'class' : 'trace'
34
- } ) ;
35
- pieGroups . exit ( ) . remove ( ) ;
36
- pieGroups . order ( ) ;
37
-
38
- pieGroups . each ( function ( cd ) {
27
+ var pieGroups = Lib . makeTraceGroups ( fullLayout . _pielayer , cdpie , 'trace' ) . each ( function ( cd ) {
39
28
var pieGroup = d3 . select ( this ) ;
40
29
var cd0 = cd [ 0 ] ;
41
30
var trace = cd0 . trace ;
42
31
43
32
setCoords ( cd ) ;
44
33
34
+ // TODO: miter might look better but can sometimes cause problems
35
+ // maybe miter with a small-ish stroke-miterlimit?
36
+ pieGroup . attr ( 'stroke-linejoin' , 'round' ) ;
37
+
45
38
pieGroup . each ( function ( ) {
46
39
var slices = d3 . select ( this ) . selectAll ( 'g.slice' ) . data ( cd ) ;
47
40
You can’t perform that action at this time.
0 commit comments