let yAxisDatas = [658, 1024, 852, 926, 786];
let yData = [];
yAxisDatas.forEach((item) => {
if (item == Math.max(...yAxisDatas)) {
yData.push({
value: item,
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1, // 这四个参数分别表示渐变的起点 (x1, y1) 与终点 (x2, y2)
[
{
offset: 1,
color: "rgba(251,192,32,0)", // 0% 处的颜色
},
{
offset: 0,
color: "rgba(255,138,41,1)", // 100% 处的颜色
},
]
),
},
});
} else {
yData.push(item);
}
});
12-21
515