@@ -43,7 +43,7 @@ function links_of_type(d, key) {
43
43
console . log ( "platform_uid is " + platform_uid ) ;
44
44
break ;
45
45
}
46
- }
46
+ }
47
47
var linktypes = keytypes [ key ] ;
48
48
var type_links = [ ] ;
49
49
for ( var link in d . links ) {
@@ -90,7 +90,8 @@ function arcMaths(d, i) {
90
90
91
91
if ( d . endAngle > 90 * Math . PI / 180 &&
92
92
start > ( 180 - end ) &&
93
- ( end - start ) % 360 != 0 ) {
93
+ Math . round ( end - start ) % 360 != 0 ) {
94
+ console . log ( "FLIPPING" + " start is " + start + " and end is " + end ) ;
94
95
var startLoc = / M ( .* ?) A / ;
95
96
var middleLoc ,
96
97
endLoc ;
@@ -112,6 +113,9 @@ function arcMaths(d, i) {
112
113
}
113
114
newArc = "M" + newStart + "A" + middleSec + numbers + newEnd ;
114
115
}
116
+ else {
117
+ console . log ( "nope" + " start is " + start + " and end is " + end ) ;
118
+ }
115
119
chartg . append ( "path" )
116
120
. attr ( "class" , "hiddenDonutArcs" )
117
121
. attr ( "id" , "donutArc" + i )
@@ -448,7 +452,7 @@ function plotdonut(graphdata, mydata) {
448
452
var degreeStart = ( d . startAngle / ( Math . PI / 180 ) ) ;
449
453
return ( d . endAngle > 90 * Math . PI / 180
450
454
&& degreeStart > ( 180 - degreeEnd )
451
- && ( ( degreeEnd - degreeStart ) % 360 != 0 ) ? 18 : - 11 ) ;
455
+ && ( Math . round ( degreeEnd - degreeStart ) % 360 != 0 ) ? 18 : - 11 ) ;
452
456
} ) ;
453
457
454
458
d3 . selectAll ( ".textpath" ) . remove ( ) ;
0 commit comments