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

"Uncaught TypeError" during hover over while zoomed into boxplot #3962

Closed
wunschsa-lilly opened this issue Jun 13, 2019 · 3 comments
Closed
Assignees

Comments

@wunschsa-lilly
Copy link

Hello Plotly Community!

Recently I have tried developing a boxplot merged with a scatter plot locally. I noticed performance problems and increased memory usage when I would zoom in to specific areas of the chart and tried hovering over the areas. I also found that the text displayed next to data points of these zoomed in regions appeared in a different format. Upon inspecting the console in chrome, I have come to find out that an error was being thrown each time this obscure hover event occurred. Below is a screen shot of the error from the console:

image

The number in the top left increases quickly as you continue to hover over the data, which in turn causes the performance issues. I figured this was a problem with my code or React, but when I tried the Javascript example online, I was able to replicate the same error. The Code Pen example below is the simple example that you can also find on the Plotly JS website for boxplots (https://plot.ly/javascript/box-plots/).

How to Replicate the Error: If you zoom into this plot and it does not show the Q1 box value, the error will occur. If the Q1 box value is present, then the error does not exist and the plot functions normally.

When Q1 is zoomed out of the plot (causes error):
image

When Q1 is NOT zoomed out of the plot (no error):
image

I was able to fix this problem in the plotly.js script (starts at while loop on line 91003). It occurs because an "undefined" value is passed as an array instead of the minimum Q1 value.

Let me know if there is any further information you need on my end to assist with this small bug.

Code Pen: https://codepen.io/wunschsa/pen/gNaRQP?editors=1111

Plotly is an amazing tool, thank you for the capability.

@etpinard
Copy link
Contributor

etpinard commented Jun 14, 2019

Reproducible example in zoomed view: https://codepen.io/etpinard/pen/XLXWOY?editors=1111

Thanks very much for reporting @wunschsa-lilly !!

@etpinard etpinard self-assigned this Jun 14, 2019
@etpinard
Copy link
Contributor

Related: #3889

@etpinard
Copy link
Contributor

Looks like this was working fine back in 1.45.2: https://codepen.io/etpinard/pen/YowGmZ?editors=1011

a regression most likely coming from #3645

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