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

browser slows down when clicking on legend #3026

Open
glauni opened this issue Jan 9, 2023 · 2 comments
Open

browser slows down when clicking on legend #3026

glauni opened this issue Jan 9, 2023 · 2 comments
Labels

Comments

@glauni
Copy link

glauni commented Jan 9, 2023

Description

When clicking on an item in the legend, the browser slows down rapidly and stops working.

Steps to check or reproduce

I made a codepen that reproduces the error. Would be nice if u were able to look at this.

https://codepen.io/benl96/pen/BaPpgyK

Expected Behaviour

So it should probably show/hide without any lags in the browser. I have to close the tab and reopen it in order to be able to get the graph back to default.

Thanks

@netil netil added the question label Jan 10, 2023
@netil
Copy link
Member

netil commented Jan 10, 2023

Hi @benl96, from your generation code example contains transition.duration=1000 option, which means on every animation on chart, it will take 1 second to complete.

So, is obvious that when toggling legend it will take 1 second to complete the action to hide(or show).
Lower the value or set 0(zero) if don't want animation delays.

@glauni
Copy link
Author

glauni commented Jan 10, 2023

Hi @benl96, from your generation code example contains transition.duration=1000 option, which means on every animation on chart, it will take 1 second to complete.

So, is obvious that when toggling legend it will take 1 second to complete the action to hide(or show). Lower the value or set 0(zero) if don't want animation delays.

Hi @netil - thanks for looking into this. You're right, removing transition removes the delay, however- as you're saying, 1 second to complete an action (wether hide or show) should still end up finishing said action.

If I have transition in my options, my whole Browser just slows down when clicking. It stops working in that tab, only way to fix it is to restart the browser, that somehow can't be the intended behaviour?

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

No branches or pull requests

2 participants