Skip to content

Commit

Permalink
Merge pull request plotly#36 from steventebrinke/plotly-updates
Browse files Browse the repository at this point in the history
Adds callback for Plotly renderer updates.
  • Loading branch information
nicolaskruchten authored Jun 12, 2018
2 parents 9a68ffc + 75a865e commit a73b22b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/PlotlyRenderers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function makeRenderer(
this.props.plotlyOptions
)}
config={this.props.plotlyConfig}
onUpdate={this.props.onRendererUpdate}
/>
);
}
Expand All @@ -105,6 +106,7 @@ function makeRenderer(
Renderer.propTypes = Object.assign({}, PivotData.propTypes, {
plotlyOptions: PropTypes.object,
plotlyConfig: PropTypes.object,
onRendererUpdate: PropTypes.func,
});

return Renderer;
Expand Down Expand Up @@ -152,6 +154,7 @@ function makeScatterRenderer(PlotlyComponent) {
data={[data]}
layout={Object.assign(layout, this.props.plotlyOptions)}
config={this.props.plotlyConfig}
onUpdate={this.props.onRendererUpdate}
/>
);
}
Expand All @@ -164,6 +167,7 @@ function makeScatterRenderer(PlotlyComponent) {
Renderer.propTypes = Object.assign({}, PivotData.propTypes, {
plotlyOptions: PropTypes.object,
plotlyConfig: PropTypes.object,
onRendererUpdate: PropTypes.func,
});

return Renderer;
Expand Down

0 comments on commit a73b22b

Please sign in to comment.