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

Axis + data update with showLastLabel false does not remove all old labels #5332

Closed
dvictor-ords opened this issue May 23, 2016 · 2 comments
Closed
Assignees

Comments

@dvictor-ords
Copy link

Expected behaviour

When axis is updated, none of the older labels should be shown (unless they are part of the updated axis)

Actual behaviour

When axis is updated, not all of the older labels are removed. The label 50 remains in the below fiddle.

Live demo with steps to reproduce

http://jsfiddle.net/wqh1ngud/

Steps

  1. Click on Set new Data

Notes

  1. It doesn't happen if I swap the chart and axis update calls
  2. It doesn't happen if I set the update flag to false for the axis update call
  3. It doesn't happen unless showLastLabel is false - this is the workaround we are currently using (none of the preceding workarounds are feasible because the actual update calls are in a 3rd party angular directive)

Affected browser(s)

Chrome (50.0.2661.102 m)
Internet Explorer (11.0.9600.17914)

@jon-a-nygaard
Copy link
Contributor

Hi @dvictor-ords,

The issue is due to redraw is being called twice after each other, and the first gets interrupted by the second. It is easily avoided by waiting to do a redraw until after the updates: http://jsfiddle.net/zbLhp5L7/

@dvictor-ords
Copy link
Author

@jon-a-nygaard Thanks!

Would you know if the workaround in Notes 3. would work?

Unfortunately the fix you suggested and the one in Notes 1. and Notes 2. above are a tad too complicated because the update / redraw calls are wrapped in a 3rd party directive I'd rather not mess around with unless absolutely required.

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

No branches or pull requests

2 participants