Skip to content

Commit

Permalink
resize() function exposed to support triggering resize of Plotly grap…
Browse files Browse the repository at this point in the history
…h (e.g. after window resize, orientation change, etc.)
  • Loading branch information
Andreas Klöber authored and Andreas Klöber committed Jun 27, 2016
1 parent 5f4b405 commit 1f31c16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PlotlyComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ var PlotlyComponent = React.createClass({
this.container.removeAllListeners('plotly_selected');
},

resize: function() {
Plotly.Plots.plot(this.container);
},

render: function () {
let {data, layout, config, ...other } = this.props;
return <div {...other} ref={(node) => this.container=node} />
Expand Down

0 comments on commit 1f31c16

Please sign in to comment.