代码:
tooltip: {
trigger: "item",
// borderColor: "#12D5FC",
// backgroundColor: "#033394 80%",
backgroundColor: "transparent",
borderWidth: 1,
padding: 10,
formatter: function(params) {
// var str =params['percent']+'%'+'<br/>'+params.data.value+'笔'
var str = `<div style = "background:url( ${require("../../assets/images/mapSelPart.png")}) no-repeat center center ;width:60px;height:60px; ">${
params["percent"]
}%<br/> ${params.data.value}笔</div>`;
// parms.marker
console.log(str);
return str;
}
},