Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic d3shape.arc() broken by recent patch #143

Closed
jeremybalog opened this issue Feb 3, 2019 · 2 comments
Closed

Basic d3shape.arc() broken by recent patch #143

jeremybalog opened this issue Feb 3, 2019 · 2 comments

Comments

@jeremybalog
Copy link

jeremybalog commented Feb 3, 2019

I believe this fix has created a new issue: 52e069b

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:

const radians = 5.7
image

const radians = 5.8
image

const radians = 5.9
image

const radians = 6.0
image

const radians = 6.1
image

const radians = 6.2
image

const radians = 6.3
image

@mbostock
Copy link
Member

mbostock commented Feb 4, 2019

Confirmed present since 1.2.3.

@mbostock
Copy link
Member

mbostock commented Feb 4, 2019

Fixed in d3-shape@1.3.4, d3@5.8.1. Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants