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

scatter3d always selects point 0 on mouse hover #3258

Closed
DirkToewe opened this issue Nov 18, 2018 · 9 comments
Closed

scatter3d always selects point 0 on mouse hover #3258

DirkToewe opened this issue Nov 18, 2018 · 9 comments
Assignees
Labels
bug something broken regression this used to work

Comments

@DirkToewe
Copy link

From version 1.34.0 and onward, mouse hover on scatter3d always picks point number 0. Version 1.33.1 works fine. The problem exists in both Chrome and Firefox on Ubuntu 16.04 and Ubuntu 18.04. Here is a small example:

'use strict';
{
  async function main(){
    const data = [
      {
        type: 'scatter3d',
        mode: 'markers',
        x: Array.from( { length: 25 }, () => Math.random() ),
        y: Array.from( { length: 25 }, () => Math.random() ),
        z: Array.from( { length: 25 }, () => Math.random() )
      }
    ];
    const layout = {};

    const plot = document.createElement('div')
    plot.style = 'width: 90vw; height: 90vh'
    document.body.appendChild(plot)

    await Plotly.plot(plot, data, layout)
    plot.on('plotly_hover', event => console.log(event) )
  }
  main()
}

And here is a screenshot of the bug (notice where the mouse is pointing):
plotly_scatter3d_hover_bug

@alexcjohnson
Copy link
Collaborator

@etpinard @archmoj are you able to reproduce this? It looks fine to me on all browsers on my mac, and on browserstack it seems fine on Windows (wonder when they're going to add Ubuntu???)

@archmoj
Copy link
Contributor

archmoj commented Nov 19, 2018

@alexcjohnson I was able to reproduce the issue (visible on Ubuntu). Here is a codepen demo.

@archmoj archmoj added bug something broken regression this used to work labels Nov 19, 2018
@archmoj archmoj self-assigned this Nov 19, 2018
@shimwell
Copy link

Also came across this using Ubuntu with Firefox and Chrome.

Hovertext appears to show only the first item from the list of markers

temp-plot.zip

@etpinard
Copy link
Contributor

@archmoj
Copy link
Contributor

archmoj commented Nov 21, 2018

I tested this on another laptop running Windows 7, and it works well. So it looks the issue might only be related to Ubuntu. Wondering @bpostlethwaite could you please test this demo on Arch-Linux?

@bpostlethwaite
Copy link
Member

I can see the same bug - hover shows up on the same point:
Arch-Linux
Chrome Version 71.0.3578.44 (Official Build) beta (64-bit)

@shimwell
Copy link

shimwell commented Nov 28, 2018

No sure if this helps narrow down the problem but I just uninstalled plotly (python) in Ubuntu version 3.4.1 and installed the newest one 3.4.2 and it fixed this problem for me.
pip uninstall plotly
pip install plotly

@shimwell
Copy link

Ah, looks like the bug is still there. Hover points do work initially :-)

but once the user rotates or zooms then the hover points stop working and get stuck on point [0] again

simplescreenrecorder-2018-11-29_08.14.52.zip

@DirkToewe
Copy link
Author

DirkToewe commented Dec 5, 2018

Thank You so much @archmoj. Looking forward to the next release.

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

No branches or pull requests

6 participants