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

Animation bug when coupled with plugin deferred #18

Open
chrispahm opened this issue May 12, 2020 · 0 comments
Open

Animation bug when coupled with plugin deferred #18

chrispahm opened this issue May 12, 2020 · 0 comments

Comments

@chrispahm
Copy link

Hey there,
thanks for the amazing plugin!

I noticed that when the outlabeledPie chart type is used in combination with the deferred plugin, the animation of the chart first goes counter-clockwise, then waits for the defferer, and then spins clockwise again. Unfortuntately, that doesn't look good and also defeats the purpose of the deferred option.
Kapture 2020-05-12 at 12 12 14

See Fiddle

The issue can be 'fixed' by setting an animation duration of 1ms, and then updating the animation duration with a setTimeout function:

var options = {
  responsive: false,
  animation: {
    duration: 1
  },
  legend: {
    position: 'bottom'
  },
  plugins: {
    deferred: {
      delay: 500
    }
  } 
}
        
window.setTimeout(() => {
  window.myPieChart.options.animation.duration = 1500
}, 10)

which gives the following result
Kapture 2020-05-12 at 12 14 14
see this Fiddle for working example

As this is a mere hack, it would be nice to have it working in the repo instead!

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

No branches or pull requests

1 participant