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

Comments

Projects
None yet
2 participants
@dvictor-ords

dvictor-ords commented May 23, 2016

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 jon-a-nygaard added the Bug label May 30, 2016

@jon-a-nygaard jon-a-nygaard self-assigned this May 30, 2016

@jon-a-nygaard

This comment has been minimized.

Show comment
Hide comment
@jon-a-nygaard

jon-a-nygaard May 30, 2016

Collaborator

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/

Collaborator

jon-a-nygaard commented May 30, 2016

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

This comment has been minimized.

Show comment
Hide comment
@dvictor-ords

dvictor-ords May 30, 2016

@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.

dvictor-ords commented May 30, 2016

@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