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

transform-plotly is parsing input data incorrectly. #5683

Open
rchiodo opened this issue May 28, 2022 · 0 comments
Open

transform-plotly is parsing input data incorrectly. #5683

rchiodo opened this issue May 28, 2022 · 0 comments

Comments

@rchiodo
Copy link

rchiodo commented May 28, 2022

Application or Package Used
@nteract/transform-plotly

Describe the bug
Plotly animations don't seem to work. (see this issue: microsoft/vscode-jupyter#4364)

To Reproduce
Steps to reproduce the behavior:

  1. Create a plotly graph in VS code as mentioned in the above issue
  2. Attempt to animate
  3. Animation fails with a console error saying frames cannot be found

Expected behavior
Animation should work

Screenshots
Pertinent console output.
image

Desktop (please complete the following information):

  • OS: N/A
  • Browser N/A
  • Version: 7.0.1

Additional context
After some investigation, the problem is here:
https://github.com/nteract/outputs/blob/9f538719d77e221f756d3ea77fd8a6c768115e30/packages/transform-plotly/src/index.tsx#L64

This calls into this function in plotly:
https://github.com/plotly/plotly.js/blob/68a4917e8967bb021929e819453ee84650f7bf6f/src/plot_api/plot_api.js#L64

Which expects the 'data' parameter to be an object. If it isn't, the frames for the animation are not found.

I believe the fix would be to pass in the figure itself, and not the elements of the figure.

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

No branches or pull requests

1 participant