question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scatter3d always selects point 0 on mouse hover

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
archmojcommented, Nov 19, 2018

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

1reaction
DirkToewecommented, Dec 5, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hover only works in one point in plotly's Scatter3D
Solved. I was setting opacity=1 and apparently you can't do that with 3D scatter plots when you set the line property. trace =...
Read more >
Hover text and formatting in Python - Plotly
Over 17 examples of Hover Text and Formatting including changing color, size, log axes, and more in Python.
Read more >
plotOptions.scatter3d | highcharts API Reference
Determines whether the series should look for the nearest point in both dimensions or just the x-dimension when hovering the series. Defaults to...
Read more >
Create 3D Scatter Plot -- Python Plotly - YouTube
Learn to create the 3D scatter plot in under 25 lines of code. We will also animate the plot, and save as html...
Read more >
d3.js mouse-over effects for your scatter plot | by KJ Schmidt
This tutorial uses d3.js version 4.6.0 and builds off of a ... the speed of the data point growing on mouseover and shrinking...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found