|
|
|
@ -16,6 +16,23 @@ export default function createOpt(firstData = [], secondData = [], percent = [],
|
|
|
|
|
textStyle: {
|
|
|
|
|
color: "#fff", //设置文字颜色
|
|
|
|
|
},
|
|
|
|
|
formatter: function(param) {
|
|
|
|
|
let htmlStr = `<div>${param[0].name}</div>`;
|
|
|
|
|
for(let i = 0; i < param.length; i++) {
|
|
|
|
|
if(param[i].seriesName == '同比') {
|
|
|
|
|
htmlStr += `<div style="display: flex;justify-content: space-between;margin-top: 4px">
|
|
|
|
|
<span style="margin-right: 24px">${param[i].marker} ${param[i].seriesName} </span>
|
|
|
|
|
<span> ${param[i].value}%</span>
|
|
|
|
|
</div>`
|
|
|
|
|
} else {
|
|
|
|
|
htmlStr += `<div style="display: flex;justify-content: space-between;margin-top: 4px">
|
|
|
|
|
<span style="margin-right: 24px">${param[i].marker} ${param[i].seriesName} </span>
|
|
|
|
|
<span> ${param[i].value}</span>
|
|
|
|
|
</div>`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return htmlStr
|
|
|
|
|
},
|
|
|
|
|
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
|
|
|
|