效果如图:
核心代码:
const { RtimeList, RList, sList, $utils } = this;
series: [
{
type: "scatter",
data: RList.map((item) => {
return {
value: item,
symbol: "triangle",
symbolRotate: item < 0 ? 0 : 180,
itemStyle: {
normal: {
color: item < 0 ? "#E93030" : "#229D45",
},
},
};
}),
symbolSize: 10,
labelLine: {
show: false,
},
},
{
type: "scatter",
data: sList.map((item) => {
return {
value: item,
};
}),
itemStyle: {
normal: {
color: "#F2A01C",
},
},
},
],