给一些加背景,做成类似样子。
只要在 series 中加入 markArea 对象,而markArea中添加代码
markArea: {
itemStyle: {
color: 'rgba(255, 244, 0)',
},
data: [
[
{
name: 'Morning Peak',
xAxis: '07:30'
y: '55%', //如果出现在y周正半轴就写在上面的对象里
label: {
position: 'top', //标题出现的位置,默认在上方
}
},
{
xAxis: '10:00'
}
],
[
{
name: &#