Skip to content

Wrong fullData passed plotly_click listeners after zoom #1713

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

Closed
n-riesco opened this issue May 22, 2017 · 3 comments · Fixed by #1717
Closed

Wrong fullData passed plotly_click listeners after zoom #1713

n-riesco opened this issue May 22, 2017 · 3 comments · Fixed by #1717
Assignees
Labels
bug something broken

Comments

@n-riesco
Copy link
Contributor

The object plotlyEvent passed to a listener to plotly_click events contains amongst other the properties:

  • plotlyEvent.points[0].data = trace before transforms
  • plotlyEvent.points[0].fullData = trace after transforms

This codepen shows a chart with a sort transform that reorders the circles from A, B, C to B, C, A. It also defines a plotly_click listener that outputs the order in data and fullData.

The screencast below shows how before zooming the order in fullData is B, C, A but after zooming the order changes to A, B, C.

peek 2017-05-22 21-36

@etpinard
Copy link
Contributor

plotlyEvent.points[0].data = trace before transforms
plotlyEvent.points[0].fullData = trace after transforms

That's the intended behavior - at least to my eyes. Can you elaborate on why this is a big deal for the spotlight plugin?

@n-riesco
Copy link
Contributor Author

Before the zoom, when I click I get:

plotlyEvent.points[0].data.text = ['B', 'C', 'A']
plotlyEvent.points[0].fullData.text = ['A', 'B', 'C']

This is expected because of the sort transform.

The next time I click (after zooming) I get:

plotlyEvent.points[0].data.text = ['A', 'B', 'C']
plotlyEvent.points[0].fullData.text = ['A', 'B', 'C']

The issue is that plotlyEvent.points[0].data.text isn't sorted any longer.

@etpinard
Copy link
Contributor

Ah I see. Thanks for pointing this out @n-riesco !

It won't be pretty, but I'll figure something out.

@etpinard etpinard self-assigned this May 23, 2017
@etpinard etpinard added the bug something broken label May 23, 2017
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.

2 participants