-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Plotly.js renderer #662
Plotly.js renderer #662
Conversation
Current coverage is 66.16% (diff: 52.63%)@@ master #662 diff @@
==========================================
Files 28 30 +2
Lines 839 857 +18
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 558 567 +9
- Misses 281 290 +9
Partials 0 0
|
slick |
|
||
render() { | ||
return ( | ||
<div ref={(el) => this.el = el} /> // eslint-disable-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how the output cells work w.r.t. sizing, but we might need to set height
here if layout.height && !layout.autosize
. Here's an example figure:
data = [{x: [1, 2], y: [3, 1]}]
layout = {height: 1600}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cell allows the output to be any size it wants to be. We can set it explicitly here like you said.
render() {
const { data, layout } = this.props.data.toJS();
const style = {}
if(layout.height && !layout.autosize) {
style.height = layout.height;
}
return (
<div style={style} ref={(el) => this.el = el} /> // eslint-disable-line
)
}
Merged! 🎉 Slight coverage drop but we can address that in subsequent PRs. |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
This introduces a Plotly transform for the
application/json+plotly.v1
mimetype./cc @jackparmer @chriddyp @captainsafia