I use echarts to configure China Map in react. The currently selected item cannot be highlighted
< ReactEcharts
option= {{
title: false,
tooltip: {
trigger: "item",
},
legend: false,
visualMap: {
min: 0,
max: maxData,
left: "left",
top: "bottom",
calculable: true,
inRange: {
color: ["-sharpCCEDF8", "-sharp99DCF1", "-sharp33B9E2"]
},
},
toolbox: {
show: false,
},
series: [
{
name: "",
type: "map",
mapType: "china",
roam: false,
zoom: 1.2, //
showLengendSymbol: false, //
label: {
normal: {
show: false,
color: "-sharpfff",
},
emphasis: {
show: true,
color: "-sharpfff",
areaColor: "-sharp00A7DB",
},
},
itemStyle: {
borderWidth: 0,
},
emphasis: {
label: {
show: true,
color: "-sharpfff",
},
itemStyle: {
show: true,
areaColor: "-sharp00A7DB",
},
},
data: dataLst
}
]
}}
onEvents= {onEvents}
style= {{height: "295pxframes, width:" 100%"}
className= "react_for_echarts"
/ >
let onEvents= {
click: this.onChartClick,
}
I configured the map highlight color, but when I clicked, the page was refreshed and the selected province was not highlighted.