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

Resize doesn't accept id string #2197

Closed
alexcjohnson opened this issue Dec 7, 2017 · 1 comment
Closed

Resize doesn't accept id string #2197

alexcjohnson opened this issue Dec 7, 2017 · 1 comment
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

dynamic sizing requires you to explicitly attach a resize handler:

window.onresize = function() { Plotly.Plots.resize(gd); };

This works fine if you pass the plot div element gd, but (unlike the rest of the API) you cannot use an id 'myGraph' or you'll get an error:

Uncaught (in promise) TypeError:
  Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

cc @VeraZab

@alexcjohnson alexcjohnson added the bug something broken label Dec 7, 2017
@alexcjohnson
Copy link
Collaborator Author

closed by #2212

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

No branches or pull requests

1 participant