日环比
${params.data[3]}%
`
return html;
},
},
visualMap: {
min: 0,
max: 100,
left: 26,
bottom: 40,
showLabel: !0,
text: ["高", "低"],
"inRange": {
"color": [
"#124754",
"#4ed9f0"
]
},
show: false
},
geo: {
map: "china",
roam: 1,
scaleLimit: {
min: 1,
max: 2
},
zoom: 1,
label: {
show: true,
color: "#fff"
},
emphasis: {
label: {
show: true,
color: "#fff"
}
},
itemStyle: {
normal: {
shadowBlur: 1,
shadowColor: 'rgba(18, 32, 70,0.4)',
borderColor: "rgba(255,255,255)"
},
emphasis: {
areaColor: "#f9f500",
shadowOffsetX: 0,
shadowOffsetY: 0,
borderWidth: 0
}
},
regions: [{
name: "南海诸岛",
itemStyle: {
// 隐藏地图
normal: {
opacity: 0, // 为 0 时不绘制该图形
}
},
label: {
show: false // 隐藏文字
}
}]
},
series: [{
name: "地域分布",
type: "map",
geoIndex: 0
}]
};
myChart.setOption(option);
myChart.on('mouseover', function(params) {
var city = params.name;
let t = dataset.source.find(e => e[0] === city)[1]
for (let i = 0; i < dataset.source.length; i++) {
if (dataset.source[i][1] == t) {
myChart.dispatchAction({
type: 'highlight',
name: dataset.source[i][0]
});
}
}
});
myChart.on('mouseout', function(params) {
var city = params.name;
let t = dataset.source.find(e => e[0] === city)[1]
for (let i = 0; i < dataset.source.length; i++) {
if (dataset.source[i][1] == t) {
myChart.dispatchAction({
type: 'downplay',
name: dataset.source[i][0]
});
}
}
});