diff --git a/examples/custom/package.json b/examples/custom/package.json index d12018fc2..017eed4b7 100644 --- a/examples/custom/package.json +++ b/examples/custom/package.json @@ -7,7 +7,6 @@ "react": "^16.2.0", "react-dom": "^16.2.0", "react-chart-editor": "latest", - "react-plotly.js": "^1.7.0", "react-scripts": "1.0.17" }, "scripts": { diff --git a/examples/demo/package.json b/examples/demo/package.json index 71227c3ed..1d67f958a 100644 --- a/examples/demo/package.json +++ b/examples/demo/package.json @@ -7,7 +7,6 @@ "react": "^16.2.0", "react-dom": "^16.2.0", "react-chart-editor": "latest", - "react-plotly.js": "^1.7.0", "react-scripts": "1.0.17" }, "scripts": { diff --git a/examples/redux/package.json b/examples/redux/package.json index 12961efa2..4e91045bc 100644 --- a/examples/redux/package.json +++ b/examples/redux/package.json @@ -8,7 +8,6 @@ "react": "^16.2.0", "react-dom": "^16.2.0", "react-chart-editor": "latest", - "react-plotly.js": "^1.7.0", "react-redux": "^5.0.6", "react-scripts": "1.0.17", "redux": "^3.7.2" diff --git a/examples/simple/package.json b/examples/simple/package.json index d6b586763..096873751 100644 --- a/examples/simple/package.json +++ b/examples/simple/package.json @@ -7,7 +7,6 @@ "react": "^16.2.0", "react-dom": "^16.2.0", "react-chart-editor": "latest", - "react-plotly.js": "^1.7.0", "react-scripts": "1.0.17" }, "scripts": { diff --git a/package.json b/package.json index b49c765c4..7fe874f7d 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "raf": "^3.4.0", "react-color": "^2.13.8", "react-colorscales": "^0.4.2", - "react-plotly.js": "^1.7.0", + "react-plotly.js": "^2.0.0", "react-rangeslider": "^2.2.0", "react-select": "^1.0.0-rc.10", "react-tabs": "^2.2.1", diff --git a/src/PlotlyEditor.js b/src/PlotlyEditor.js index 7bab41ba9..98b16c05d 100644 --- a/src/PlotlyEditor.js +++ b/src/PlotlyEditor.js @@ -37,8 +37,8 @@ class PlotlyEditor extends Component { config={this.props.config} useResizeHandler={this.props.useResizeHandler} debug={this.props.debug} - onInitialized={graphDiv => this.setState({graphDiv})} - onUpdate={graphDiv => this.setState({graphDiv})} + onInitialized={(fig, graphDiv) => this.setState({graphDiv})} + onUpdate={(fig, graphDiv) => this.setState({graphDiv})} style={{width: '100%', height: '100%'}} />