Skip to content

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

Closed
@wunschsa-lilly

Description

@wunschsa-lilly

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.

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions