Here's my d parameter:
M1 40.00000000000003 69.28203230275508A80 80 0 0 -80 -9.797174393178826e-15
I receive an error:
Error: <path> attribute d: Expected number, "…9.28203230275508A80 80 0 0 -80 -…".
For some reason I only get this error when describing arcs that are greater than 180 degrees, 179' and smaller work just fine.
Update: Seems to be a regex issue surrounding how the path param is generated. Here's the block that's creating it:
let firstArcSection = /(^.+?)L/;
let newArc = firstArcSection.exec( d3.select(this).select('path').attr('d') )[1];
newArc = newArc.replace(/,/g , " ");
if (d.endAngle > 90 * Math.PI/180) {
let startLoc = /M(.*?)A/,
middleLoc = /A(.*?) 0 [01] 1/,
endLoc = / 0 [01] 1 (.*?)$/;
let newStart = endLoc.exec( newArc )[1];
let newEnd = startLoc.exec( newArc )[1];
let middleSec = middleLoc.exec( newArc )[1];
newArc = `M${newStart}A${middleSec} 0 0 0 ${newEnd}`;
}
The text still shows up on the wrong side of the arc, but there's no error now at least