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

Plotly.js renderer #662

Merged
merged 11 commits into from
Sep 1, 2016
Merged

Plotly.js renderer #662

merged 11 commits into from
Sep 1, 2016

Conversation

rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Aug 31, 2016

This introduces a Plotly transform for the application/json+plotly.v1 mimetype.

screen shot 2016-08-30 at 7 19 33 pm

/cc @jackparmer @chriddyp @captainsafia

@codecov-io
Copy link

codecov-io commented Aug 31, 2016

Current coverage is 66.16% (diff: 52.63%)

Merging #662 into master will decrease coverage by 0.34%

@@             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          

Powered by Codecov. Last update 7a609b8...5d3622e

@jdfreder
Copy link
Contributor

slick


render() {
return (
<div ref={(el) => this.el = el} /> // eslint-disable-line

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}

Copy link
Member Author

@rgbkrk rgbkrk Aug 31, 2016

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
  )
}

@rgbkrk rgbkrk changed the title [WIP] Plotly.js renderer Plotly.js renderer Sep 1, 2016
@captainsafia captainsafia merged commit 9e4a035 into nteract:master Sep 1, 2016
@captainsafia
Copy link
Member

Merged! 🎉

Slight coverage drop but we can address that in subsequent PRs.

@lock
Copy link

lock bot commented Apr 4, 2018

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.

@lock lock bot locked and limited conversation to collaborators Apr 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants