v1.0.0-rc.40
This commit is contained in:
@@ -6,16 +6,49 @@ import Plot from "react-plotly.js";
|
||||
|
||||
class MultiLinePlotWrapper extends Component {
|
||||
render() {
|
||||
let layout = {};
|
||||
|
||||
if (this.props.grid_scan === true) {
|
||||
layout = {
|
||||
xaxis: {
|
||||
title: {text: this.props.xaxis},
|
||||
showgrid: false,
|
||||
range: [0, this.props.range_x]
|
||||
},
|
||||
yaxis: {
|
||||
title: {text: this.props.xaxis},
|
||||
// autorange: "reversed",
|
||||
showgrid: false,
|
||||
range: [0, this.props.range_y]
|
||||
},
|
||||
uirevision: true
|
||||
}
|
||||
} else {
|
||||
layout = {
|
||||
xaxis: {
|
||||
title: {text: this.props.xaxis},
|
||||
showgrid: true,
|
||||
autorange: true,
|
||||
range: undefined
|
||||
},
|
||||
yaxis: {
|
||||
title: {text: this.props.xaxis},
|
||||
autorange: true,
|
||||
showgrid: true,
|
||||
range: undefined
|
||||
},
|
||||
uirevision: true
|
||||
}
|
||||
}
|
||||
|
||||
console.log(layout);
|
||||
return <Plot
|
||||
style={{width: "100%", height: "100%"}}
|
||||
data={this.props.data}
|
||||
layout={ {
|
||||
xaxis: {title: {text: this.props.xaxis}},
|
||||
yaxis: {title: {text: this.props.yaxis}},
|
||||
uirevision: true
|
||||
} }
|
||||
layout={layout}
|
||||
config = {{responsive: true}}
|
||||
/>;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user