1.自定义样式series加一项
{
type: "scatter",
coordinateSystem: "cartesian2d",
symbolSize: 50,
symbol: "pin",
symbolRotate: dzVal < 0 ? -270 : 270,
itemStyle: {
color: "#FFF",
borderColor: "#26FDF5",
borderWidth: "3",
},
label: {
normal: {
show: true,
position: "inside",
offset: [0, 4],
color: "#000",
fontWeight: "bold",
},
},
data: [
{
name: "达州市",
value: [dzVal, "达州市"],
},
],
},
隐藏原本样式
data[i].item
if (item.adname === '达州市') {
dzVal = item.zks
item.itemStyle = {
color: "#26FDF5",
};
item.label = {
show: false,
};
}
网友评论