-
Notifications
You must be signed in to change notification settings - Fork 107
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
Redraw function seems to be broken #228
Comments
It seems that the plot.set_configuration(Configuration::new().responsive(true)) However, the height of the plot is still fixed to some value and cannot fit the height of the window. |
Finally get the redraw work by adding these lines to the tail of html: function resizeGraph() {
Plotly.relayout("plotly-html-element", {
width: window.innerWidth,
height: window.innerHeight
});
}
window.addEventListener('resize', resizeGraph);
resizeGraph(); It means we re-implemented the |
I just added this function to |
I managed to make it fit to the size of the window by using plot.set_configuration(Configuration::default().responsive(true).fill_frame(true)); |
Great job! It resolves my problem. @andrei-ng I think this issue can be closed. Maybe it's a good idea to mention this issue or add an example in the documentation in case someone need automatic redraw and window filling function. |
Agreed. Will close it when I add an example in the examples/book. |
Reported by @Ionizing in #141
The text was updated successfully, but these errors were encountered: