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

plotly_click and plotly_select buggy on scatter/markers plot #1648

Closed
r1z1a opened this issue May 4, 2017 · 4 comments · Fixed by #1656
Closed

plotly_click and plotly_select buggy on scatter/markers plot #1648

r1z1a opened this issue May 4, 2017 · 4 comments · Fixed by #1656

Comments

@r1z1a
Copy link

r1z1a commented May 4, 2017

I made a codepen here:
Codepen

plotly_click:
So when you click on a given point, it only returns one object even when there is 10 points at each of the 3 locations. Does it not register the other points, that are also with same x and y coordinates?

plotly_selected:
As you can see when you select(box or lasso) any given point or set of points, the total number of objects always appends the NA items into the array. Also the selection does not give more than just x,y, pointNumber and curveNumber the actual data for each point is not passed into plotly_select.

@etpinard
Copy link
Contributor

etpinard commented May 8, 2017

So when you click on a given point, it only returns one object even when there is 10 points at each of the 3 locations. Does it not register the other points, that are also with same x and y coordinates?

That's been discussed in #720 (comment) - it is the intended behavior I'm afraid.

As you can see when you select(box or lasso) any given point or set of points, the total number of objects always appends the NA items into the array

Oh. That's a bug. Thanks for discovering it!

Also the selection does not give more than just x,y, pointNumber and curveNumber the actual data for each point is not passed into plotly_select.

Ok, but what else do you want it there?

@etpinard
Copy link
Contributor

etpinard commented May 8, 2017

As you can see when you select(box or lasso) any given point or set of points, the total number of objects always appends the NA items into the array

will be via #1656

@r1z1a
Copy link
Author

r1z1a commented May 9, 2017

That's been discussed in #720 (comment) - it is the intended behavior I'm afraid.

Yeah I suspected that this is set in stone and would make sense since not everyone would want to return multiple click events from hitting one point.
I saw that someone has made a topic about adding "jitter" functionality which would solve the issue since you would be able to zoom in very close and points would not be superimposed #299

Oh. That's a bug. Thanks for discovering it!

No problem, its better that I rewrite my code once the fix is out, than other people struggling with this problem.

Ok, but what else do you want it there?

Stemming back from first issue where _click will not allow you to hit multiple points and, and since there is no jittering I'm using the _select to pick up the points that are below the top one. It would be nice if it also returned data, like plotly_click. Although I understand you can get the data for whole graph from the div and then go though each point and get the info that way.
Just thought it would be nice to have consistence between the 2 events since they seem similar in that way. Maybe just for me and way I use them.

Thanks for quick response

@etpinard
Copy link
Contributor

etpinard commented May 9, 2017

It would be nice if it also returned data, like plotly_click

Oh good point! I agree. Double-checking with @alexcjohnson before I add it in.

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

Successfully merging a pull request may close this issue.

2 participants