NEZ-316 fix: alert message current 查询处理labels为空的情况 & alert message图表添加阈值提示

This commit is contained in:
wangwenrui
2020-06-05 17:45:31 +08:00
parent 930e3bfe04
commit 1f49b3b56f
3 changed files with 125 additions and 16 deletions

View File

@@ -1146,6 +1146,7 @@
}
},
lineStyle:{
color:'#d64f40',
width:2,
type:'dotted'
},
@@ -1236,10 +1237,15 @@
});
});
},
computeDistance:function(value){
let temp=value+'';
let length=temp.length *12 -20;
return Number('-'+length)
computeDistance:function(str){
var width = 0;
var html = document.createElement('span');
html.innerText = str;
html.className = 'getTextWidth';
document.querySelector('body').appendChild(html);
width = document.querySelector('.getTextWidth').offsetWidth;
document.querySelector('.getTextWidth').remove();
return Number('-'+width);
},
showLoad(chartItem) {
//设置高度