apexcharts - ApexCharts 气泡 - 更改季度背景颜色
问题描述
我正在使用 ng-apexcharts,我只想将背景的四分之一更改为另一种颜色,如下例所示: 在此处输入图像描述
目前使用带有 offestY 的注释,但我们无法理解 offfestY 值是什么以及我们如何使它成为图形大小的 50%。
代码示例:
chart: {
type: 'bubble',
height: auto,
...
},
annotations: {
xaxis: [
{
x: 50,
x2: 100,
fillColor: '#f15252',
opacity: 0.1,
offsetY: -70, // How to calculate this value to be exactly 50% offest?
}
],
},
谢谢!
解决方案
我找到了一个解决方案,也许它会帮助某人:
events: {
mounted: (chart, options) => {
const offsetX = options.globals.gridWidth / 2;
this.chart.addYaxisAnnotation({
y: 5,
y2: 10,
fillColor: '#f15252',
opacity: 0.1,
offsetX,
});
},
}
推荐阅读
- c - 从c中的txt文件读取
- c++ - 如何在系统进程中获取用户的当前会话?
- python - 安装本地 python 包时遇到问题
- python - 列不是熊猫数据框的列
- java - 如何在线调用 Rest Api 端点?如何将我的代码放入真实服务器
- python - 如何根据类型取消选择 pydatatable 列?
- docker - 将 Django 部署到 App Engine 柔性环境 - 超时错误响应:[4]
- python - python - 召回浏览过的文件
- android - Android 5 中的崩溃 - 在 onResume 中抛出 IllegalStateException
- mysql - 在 my.cnf 文件中,将 bind-address 更改为 127.0.0.1 并且它仍然允许远程连接