是否可以在 ApexCharts 中创建球门线?
Is it possible to create a goal line in ApexCharts?
我有一个显示用户体重的图表,我想在用户希望达到的特定体重处添加一条水平线(目标线)。
ApexCharts 有这个选项吗?
已解决
您可以使用注释添加水平线或垂直线。
https://apexcharts.com/docs/annotations/
annotations: {
yaxis: [
{
y: 20,
borderColor: '#00E396',
label: {
borderColor: '#00E396',
style: {
color: '#fff',
background: '#00E396'
},
text: 'Y-axis annotation on 8800'
}
}
]
}
我有一个显示用户体重的图表,我想在用户希望达到的特定体重处添加一条水平线(目标线)。
ApexCharts 有这个选项吗?
已解决
您可以使用注释添加水平线或垂直线。
https://apexcharts.com/docs/annotations/
annotations: {
yaxis: [
{
y: 20,
borderColor: '#00E396',
label: {
borderColor: '#00E396',
style: {
color: '#fff',
background: '#00E396'
},
text: 'Y-axis annotation on 8800'
}
}
]
}