MarkPoint设置value后,在标记出还是显示出value,只有当鼠标滑动到标记处时,才会显示value值
配置项如下
option = {
title: {
text: '交易量',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left',
data:['iphone3']
},
visualMap: {
min: 0,
max: 2500,
left: 'left',
top: 'bottom',
text: ['高','低'], // 文本,默认为数值文本
calculable: true
},
toolbox: {
show: true,
orient: 'vertical',
left: 'right',
top: 'center',
feature: {
saveAsImage: {}
}
},
series: [
{
name: 'iphone3',
type: 'map',
map: 'cichuan',
roam: false,
label: {
normal: {
show: true
},
emphasis: {
show: true
}
},
data:[],
markPoint:{
label:{normal:{show: true},emphasis:{show:true}},
itemStyle:{
normal:{color:'skyblue',}
},
data:[
{name:'成都市',x: 480,y: 300,value:120}
]
}
}
]
};
sichuan_map.setOption(option);