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

Lines disappear when displaying small numbers and large numbers are off screen #403

Closed
KenCoder opened this issue Apr 6, 2016 · 9 comments · Fixed by #2060
Closed

Lines disappear when displaying small numbers and large numbers are off screen #403

KenCoder opened this issue Apr 6, 2016 · 9 comments · Fixed by #2060
Labels
bug something broken

Comments

@KenCoder
Copy link

KenCoder commented Apr 6, 2016

Can see this clearly here: https://plot.ly/~KenCoder/11/percent-vs-date/

Move your mouse in the middle of the chart - the hover displays the data, but the line isn't visible. The cause seems to be a large value on 10/1/1924. Even though that value is off screen, it's messing up the rest of the points. Pressing auto-scale shows the large point (and the rest of the line) but reset axes reverts the error.

I believe this was introduced in the last few months, as these charts worked for us in a prior version of plotly.js

@etpinard etpinard added the bug something broken label Apr 7, 2016
@etpinard
Copy link
Contributor

etpinard commented Apr 7, 2016

Thanks for the bug report.

You are correct. This bug was introduced in v1.7.1 most likely in PR #353

Reproductible codepen: http://codepen.io/etpinard/pen/QNadEQ

@etpinard
Copy link
Contributor

etpinard commented Apr 7, 2016

Converting the x values to JS dates does not solve the problem: http://codepen.io/etpinard/pen/vGpgJy

@myw
Copy link

myw commented Jul 11, 2016

I believe I have found a temporary workaround, mentioned in ginkgobioworks/plotly-plot#1: when using the javascript library and adding new traces, use addTraces instead of just setting .data and calling Plotly.redraw.

The use case in ginkgobioworks/plotly-plot#1 was for a 3D scatter plot, but the behavior was similar: the data that was much larger was entirely off-screen, and the plot did not adjust.

The difference seems to be that Plotly.addTraces calls a private method named cleanData before redrawing, but Plotly.redraw does not. Adding a call to cleanData before every redraw may fix the issue.

@etpinard
Copy link
Contributor

@myw Hmm. I think you discovered a separate issue.

This issue here seems to be related to an overflow error somewhere.

Would you mind filing a new issue that includes a reproducible example?

@myw
Copy link

myw commented Jul 25, 2016

@etpinard Seems like I am now unable to reproduce the behavior I was seeing earlier; maybe this has already been resolved recently?

I have this JSFiddle up just in case.

@etpinard
Copy link
Contributor

@myw maybe ...

But this bug is still present in this codepen http://codepen.io/etpinard/pen/QNadEQ in the latest release.

@myw
Copy link

myw commented Jul 27, 2016

@etpinard Sorry, I was unclear. I meant that, per your suggestion that I discovered a separate issue, I opened a JSFiddle to try to reproduce the behavior I was seeing. That behavior no longer seems to apply. As to the original issue, I didn't look into it, but yes, it does seem to still exist.

@mdfederici
Copy link

@etpinard is this still being looked at? I'm getting this as well and its reasonably painful.

@etpinard
Copy link
Contributor

Not locked. But not actively develop either as far as I know.

It has proven very hard to fix this bug while maintaining the specs added in #353

Maybe attempt to set a hard zoom limit (related to #887) on cartesian graphs instead?

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

Successfully merging a pull request may close this issue.

4 participants