创建绘图时,我的Plotly模式栏运行两行而不是一行。有什么想法吗?
exports.createPlot = function(){
var trace1 = {
x: [1, 2, 3, 4],
y: [10, 15, 13, 17],
type: 'scatter'
};
var trace2 = {
x: [1, 2, 3, 4],
y: [16, 5, 11, 9],
type: 'scatter'
};
var data = [trace1, trace2];
var layout = {
showlegend: false,
updatemenus: updatemenus,
};
Plotly.newPlot('plot', data, layout, {displayModeBar: true});
//display mode set to true for the purpose of taking the screenshot
}
通常,模式栏会像我看到的所有示例一样在一行上运行。
更新:
这是父div.main和图div.plot-panel的CSS:
div.main-content
{
border: 1px solid white;
background-color: #EBEDEB;
display: inline-block;
float: none;
left: 162px;
height: 86.6%;
margin: 0px;
top: 114px;
position: absolute;
width: 90%;
}
div.plot-panel
{
border: 1px solid #EFF2EF;
background-color: #FFFFFF;
border-radius: 1%;
display: inline-block;
float: none;
height: 350px;
left: 600px;
right: 0px;
margin: 0px;
position: absolute;
top: 390px;
width: 600px;
}