perf:图表阈值label计算方式优化
This commit is contained in:
@@ -1135,10 +1135,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computeDistance:function(value){
|
computeDistance:function(str){
|
||||||
let temp=value+'';
|
var width = 0;
|
||||||
let length=temp.length *12 -20;
|
var html = document.createElement('span');
|
||||||
return Number('-'+length)
|
html.innerText = str;
|
||||||
|
html.className = 'getTextWidth';
|
||||||
|
document.querySelector('body').appendChild(html);
|
||||||
|
width = document.querySelector('.getTextWidth').offsetWidth;
|
||||||
|
document.querySelector('.getTextWidth').remove();
|
||||||
|
return Number('-'+width);
|
||||||
},
|
},
|
||||||
modelStaticData(chartInfo, filterType) {
|
modelStaticData(chartInfo, filterType) {
|
||||||
let series = [];
|
let series = [];
|
||||||
|
|||||||
@@ -202,9 +202,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style >
|
||||||
<style>
|
|
||||||
.config-dropdown{
|
|
||||||
width: unset !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user