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

onClick for pies slices doesn't return any trace info #1456

Closed
andrey-zakharov opened this issue Mar 9, 2017 · 8 comments · Fixed by #2117
Closed

onClick for pies slices doesn't return any trace info #1456

andrey-zakharov opened this issue Mar 9, 2017 · 8 comments · Fixed by #2117
Assignees
Labels
community community contribution feature something new

Comments

@andrey-zakharov
Copy link

Code sample:
http://codepen.io/anon/pen/ZeLdXK?editors=0011

If i click any pie other that the biggest one ( first ) no there is no any trace info in event data. neither in points[0], nor in event.trace. Actually, there is "event.points.trace = undefined".
console.log(e) gives only:
image

@etpinard
Copy link
Contributor

etpinard commented Mar 9, 2017

Right. Sounds like an easy PR to make.

@andrey-zakharov want to give it a shot? Adding a ref to trace in evt here should be good enough.

@etpinard etpinard added community community contribution feature something new labels Mar 9, 2017
n-riesco added a commit to n-riesco/plotly.js that referenced this issue Mar 21, 2017
* Test that 'plotly_click' doesn't emit an undefined trace.
n-riesco added a commit to n-riesco/plotly.js that referenced this issue Mar 21, 2017
n-riesco added a commit to n-riesco/plotly.js that referenced this issue Mar 21, 2017
* Test that 'plotly_click' doesn't emit an undefined trace.
n-riesco added a commit to n-riesco/plotly.js that referenced this issue Mar 21, 2017
@blokhin
Copy link

blokhin commented Aug 28, 2017

Unfortunately, still an issue with the latest (v1.30.0)

@etpinard
Copy link
Contributor

Unfortunately, still an issue with the latest (v1.30.0)

Works for me: https://codepen.io/etpinard/pen/prxrbg?editors=0010

@blokhin
Copy link

blokhin commented Aug 28, 2017

Chrome 60.0.3112, FF 54.0.1: click at green or orange area in your pen yields undefined in console (blue area is OK).

@etpinard etpinard reopened this Aug 28, 2017
@etpinard
Copy link
Contributor

thanks @blokhin , reopened.

@blokhin
Copy link

blokhin commented Oct 9, 2017

Any chance the bugfix will be included in the next release?

@alexcjohnson
Copy link
Collaborator

Pie event data is currently very different from most other plotly event data. I'm going to clean this up as part of #2073.

@alexcjohnson
Copy link
Collaborator

Note that pie event data changed a fair amount with #2117 - should all be for the better but if anyone was using all the various internal-use coordinates that were being reported previously you will have to find another way to retrieve them 🙈

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

Successfully merging a pull request may close this issue.

4 participants