Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit f9fe254

Browse files
committed
Wire config through the Plotly.newPlot call`
1 parent ad341fc commit f9fe254

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Graph.react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ export default class PlotlyGraph extends Component {
6464
}
6565

6666
plot(props) {
67-
const {id, figure, animate, animation_options} = props;
67+
const {id, figure, animate, animation_options, config} = props;
6868
const {hasPlotted} = this.state;
6969
const gd = document.getElementById(id);
7070
if (animate && hasPlotted && figure.data.length === gd.data.length) {
7171
return Plotly.animate(id, figure, animation_options);
7272
} else {
73-
return Plotly.newPlot(id, figure).then(() => {
73+
return Plotly.newPlot(id, figure.data, figure.layout, config).then(() => {
7474
this.bindEvents(props);
7575
this.setState({hasPlotted: true});
7676
});

0 commit comments

Comments
 (0)