邓洁 : 弹窗提示框样式
This commit is contained in:
@@ -127,9 +127,21 @@ const initChart = () => {
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
backgroundColor: "transparent", // 设置背景颜色为透明
|
||||
borderColor: "transparent", // 设置边框颜色为透明
|
||||
padding: 0, // 设置内边距为0
|
||||
textStyle: {
|
||||
fontSize: 40
|
||||
}
|
||||
},
|
||||
formatter: function (params) {
|
||||
let content = `
|
||||
<div style="background: linear-gradient(180deg, #254062 0%, rgba(20,36,51,0.3) 100%);border: 2px solid #6087BA;border-radius: 4px;padding: 8px 16px;">
|
||||
<div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: 8px;">${params[0].name}日</div>
|
||||
<div style="font-size: 48px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;"><span style="color: #FFFFFF">日用电量: </span><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[0].value}</span></div>
|
||||
<div style="font-size: 48px;line-height: 48px;font-family: Bebas Neue-Regular, Bebas Neue;font-weight: 400;margin-top: 30px"><span style="color: #FFFFFF">日节省量: </span><span style="background: linear-gradient(180deg, #F5B85F 0%, #FFFFFF 100%);background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;">${params[1].value}</span></div>
|
||||
</div>`;
|
||||
return content;
|
||||
},
|
||||
},
|
||||
toolbox: {
|
||||
show: false,
|
||||
|
||||
Reference in New Issue
Block a user