Skip to content

Commit 185ce73

Browse files
authored
Merge pull request #167 from plotly/more-simple-example-adjustments
Few more example adjustments
2 parents 50e2c03 + 63760f9 commit 185ce73

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

examples/simple/src/App.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class App extends Component {
1616
const dataSourceOptions = [
1717
{value: 'col1', label: 'CO2'},
1818
{value: 'col2', label: 'NO2'},
19-
{value: 'col2', label: 'SiO2'},
19+
{value: 'col3', label: 'SiO2'},
2020
];
2121

2222
// A basic starting plotly.js figure object. Instead of assigning
@@ -66,14 +66,16 @@ class App extends Component {
6666
plotly={plotly}
6767
revision={this.state.editorRevision}
6868
/>
69-
<Plot
70-
debug
71-
data={this.state.figure.data}
72-
layout={this.state.figure.layout}
73-
onUpdate={this.hub.handlePlotUpdate}
74-
onInitialized={this.hub.handlePlotInitialized}
75-
revision={this.state.plotRevision}
76-
/>
69+
<div className="plotlyPlot">
70+
<Plot
71+
debug
72+
data={this.state.figure.data}
73+
layout={this.state.figure.layout}
74+
onUpdate={this.hub.handlePlotUpdate}
75+
onInitialized={this.hub.handlePlotInitialized}
76+
revision={this.state.plotRevision}
77+
/>
78+
</div>
7779
</div>
7880
);
7981
}

examples/simple/src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ body {
33
padding: 0;
44
font-family: sans-serif;
55
}
6+
7+
.plotlyPlot {
8+
vertical-align: top;
9+
display: inline-block;
10+
}

0 commit comments

Comments
 (0)