邓洁 : 弹窗提示框样式
This commit is contained in:
@@ -156,9 +156,25 @@ const initChart = () => {
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: "axis",
|
||||
backgroundColor: "rgba(20,36,51,0.7)", // 设置背景颜色为透明
|
||||
borderColor: "#6087BA", // 设置边框颜色为透明
|
||||
padding: 0, // 设置内边距为0
|
||||
borderWidth:2,
|
||||
textStyle: {
|
||||
fontSize: 40
|
||||
}
|
||||
fontSize: 40,
|
||||
},
|
||||
formatter: (params)=> {
|
||||
console.log(params)
|
||||
let res = ` <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: -30px">${params[0].name}</div>` + '<br/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
res += `
|
||||
<div style="font-size: 52px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;margin:0 20px 30px 20px;"><span style="color: #FFFFFF">${params[i].seriesName}: </span><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[i].value}</span></div>
|
||||
`;
|
||||
}
|
||||
return res
|
||||
|
||||
// return content;
|
||||
},
|
||||
},
|
||||
toolbox: {
|
||||
show: false,
|
||||
@@ -301,7 +317,7 @@ const initChart = () => {
|
||||
},
|
||||
],
|
||||
};
|
||||
myEcharts.setOption(option);
|
||||
myEcharts.setOption(option,true);
|
||||
//图表大小自适应窗口大小变化
|
||||
window.onresize = () => {
|
||||
myEcharts.resize();
|
||||
|
||||
Reference in New Issue
Block a user