the project requires two pages of a map of China and a map of the world, and needs to highlight the provinces or countries regularly. Now the map of China can meet the requirements, that is, modify the data, in serives to add selected:true; to those that need to be highlighted, but in the world map, I still can"t highlight it. Is the setting of the world map different from the map of China?
mapData=[
{
name:"",
value:2222,
selected:true
}
]
const drawWorld = id => {
console.log(mapData)
clearInterval(t1)
let myChart = echarts.init(document.getElementById(id))
let option = {
tooltip: {
trigger: "item"
},
visualMap: {
show: false,
min: 0,
max: 1000000,
text: ["100000000", "0"],
realtime: false,
calculable: true,
inRange: {
color: ["-sharp5ca7dc", "-sharp2c55a5"]
}
},
//
series: [{
name: "",
type: "map",
mapType: "world",
nameMap: nameMap,
// roam: true,//
label: {
normal: {
show: false //
},
emphasis: {
color: "-sharpFff",
show: true
}
},
data: mapData //
}]
}
myChart.setOption(option)
}