Closed jeremybalog closed 5 years ago
I believe this fix has created a new issue: https://github.com/d3/d3-shape/commit/52e069b4cefee5b3eba25a3318eba48765d43334
Everything was working perfectly fine previously, but now our code is producing errors. Consider the following code:
const radians = 5.7 const arc = d3shape.arc() .startAngle( 0 ) .endAngle( d => { return radians }) .innerRadius( d => { return 70 - ( d.index * 20 ) }) .outerRadius( d => { return 90 - ( d.index * 20 ) }) .cornerRadius( 10 )
We can all agree that there are 2 * Math.PI = ~6.28 radians in a circle. By changing the radians variable, this is the output of the arcs:
2 * Math.PI = ~6.28
radians
const radians = 5.7
const radians = 5.8
const radians = 5.9
const radians = 6.0
const radians = 6.1
const radians = 6.2
const radians = 6.3
Confirmed present since 1.2.3.
Fixed in d3-shape@1.3.4, d3@5.8.1. Thanks for the report.
I believe this fix has created a new issue: https://github.com/d3/d3-shape/commit/52e069b4cefee5b3eba25a3318eba48765d43334
Everything was working perfectly fine previously, but now our code is producing errors. Consider the following code:
We can all agree that there are
2 * Math.PI = ~6.28
radians in a circle. By changing theradians
variable, this is the output of the arcs:const radians = 5.7
const radians = 5.8
const radians = 5.9
const radians = 6.0
const radians = 6.1
const radians = 6.2
const radians = 6.3