javascript - Plotly 模式栏运行在两行而不是一行
问题描述
创建绘图时,我的 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 和 plot 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;
}
解决方案
推荐阅读
- autohotkey - 如果浏览器已经打开,则 autoHotkey 关闭浏览器
- css - 在 css 文件中设置 text-rendering: optimizeLegibility 是什么意思?
- android - Firebase“云存储位置”如何选择?
- rest - 使用 API 是什么意思?
- google-api - Google Meet 有直接的 API 吗?
- flutter - Firestore 的 GeoFlutterFire Flutter 插件不返回距离字段
- java - 在apache camel spring dsl xml中调用两个toD
- awk - 使用awk,如何平均文本文件中两个字符串之间的列中的数字
- javascript - 使用 javascript 在文本框中创建分数
- python - 比较列表中的跨度,如果相似则返回标签