![在这里插入图片描述 [echarts] markArea显示不同颜色_echarts](https://file.cfanz.cn/uploads/png/2023/03/25/4/1HN83ee877.png)
![在这里插入图片描述 [echarts] markArea显示不同颜色_bc_02](https://file.cfanz.cn/uploads/png/2023/03/25/4/86aJ320b8B.png)
markArea:  {
   data: [
        [{
            yAxis: '50',
            itemStyle:{
                color:'#c60c30'
            }
        }, {
            yAxis: '60'
        }],
         [{
            yAxis: '60',
            itemStyle:{
                color:'#25C50E'
            }
        }, {
            yAxis: '80'
        }]
    ],
}渐变色:
markArea:  {
   data: [
       [
	       {
	           yAxis: '50',
	            itemStyle: {
	                //  看这里,加了这个属性
	                color: new echarts.graphic.LinearGradient(
	                  0,
	                  1,
	                  0,
	                  0,
	                  [
	                    {
	                      offset: 0,
	                      //   color: '#8bd46e'
	                      color: '#00CEFF'
	                    },
	                    {
	                      offset: 1,
	                      // color: '#09bcb7'
	                      color: '#B5F2FF'
	                    }
	                  ],
	                  false
	                )
              }
	        },
	        {
	            yAxis: '100'
	        }
        ],
        
        ... ...    //  如果有多种颜色,就继续在这里写区间数组,复制上面的下来改颜色
    ],
}![在这里插入图片描述 [echarts] markArea显示不同颜色_echarts_03](https://file.cfanz.cn/uploads/png/2023/03/25/4/O8e9J2CYYC.png)
参考:
echarts图表分区域–显示不同颜色(markArea)
                










