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

Data labels are deferred when animation duration is 0 #10496

Closed
jon-a-nygaard opened this issue Apr 5, 2019 · 4 comments

Comments

@jon-a-nygaard
Copy link
Member

commented Apr 5, 2019

Expected behaviour

The data labels should not be deferred and animated in when animation duration is set to 0.

Actual behaviour

The data labels are deferred and animated in after a while.

Workaround: Set series.animation to false and it works as expected.

Live demo with steps to reproduce

Use the following example to reproduce the issue, see the comments for more information.
Example of issue

Product version

Highcharts v7.1

Affected browser(s)

All

@pawelfus

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

@jon-a-nygaard - aren't dataLabels controlled by dataLabels.defer option? See: https://jsfiddle.net/BlackLabel/3bL5o1h0/

@jon-a-nygaard

This comment has been minimized.

Copy link
Member Author

commented Apr 5, 2019

Yes they are, but when series.animation is false they are not deferred as it takes precedence.
Since animation: { duration: 0 } can be considered the same as animation: false in Highcharts, then I believe they should have the same behavior.

@pawelfus

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2019

Hm, right, that makes sense. Defer should show labels after animation, so since animation is disabled, then labels should show up right away.

@TorsteinHonsi

This comment has been minimized.

Copy link
Collaborator

commented Apr 5, 2019

The fix will be to parse series.animation through H.animObject and then check for duration on the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.