javascript - 在 plotly 饼图 hoverlabel 中增加填充 - javascript
问题描述
我正在尝试使用以下方法增加饼图的 hoverlabel 属性的填充,但似乎不起作用。有没有人尝试过这个用例或者有没有其他方法可以做到这一点..
hoverlabel: {
bgcolor: 'white',
bordercolor: '#e7e7e7',
font: {
color: 'black',
},
padding: {
t: '20',
b: '50',
l: '0',
r: '0'
},
borderwidth: 2
}
解决方案
您可以使用 CSS 展开图例框,然后移动悬停元素。
.legend .bg {
rx: 10px;
transform: scale(1.2, 1.2);
}
.legend .scrollbox {
transform: translate(10px, 7px);
}
不是一个完美的解决方案,但它有效。
推荐阅读
- ios - SwiftUI numberpad(TextField) 无法更新绑定变量
- python - 从模块导入时不显示 tkinter 窗口
- r - R:在 tidyverse 中创建一个函数
- javascript - 我们如何在 JavaScript 中使用 foreach 循环增加变量计数
- javascript - 获取轴文本元素的属性 x
- android - 小部件单击调用死 Activity 上的方法
- c++ - 如何在 Mac OS 上使用 Eclipse 生成 C++ 构造函数/复制构造函数
- java - 将数组中的结果与 java 中的用户输入分开打印
- batch-file - 批处理如何让 Batch CMD 在第二个监视器上弹出,而不是在默认监视器上
- android - 在运行时更改 Android 上的语言不适用于 API < 26