fix:修改问题
1 legend区域设置最大高度,渲染时首先计算legend区域高度,在根据设置高度计算chart高度 2 chart整体设置高度 个位采用 四舍五入,如设置高度为454,实际渲染高度为 450
This commit is contained in:
@@ -108,7 +108,7 @@ export default {
|
||||
//设置高度
|
||||
this.$nextTick(() => {
|
||||
const chartBox = document.getElementById('chartUrlDiv'+this.chartIndex);
|
||||
let height = chartItem.height;
|
||||
let height = Math.round(chartItem.height/10)*10;//图表高度四舍五入
|
||||
if(height<this.minHeight){
|
||||
height = this.minHeight;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ export default {
|
||||
prev:parseInt(_this.data.prev),
|
||||
next:parseInt(_this.data.next),
|
||||
};
|
||||
|
||||
targetDiv.style.height = (Math.round((containerHeight+_this.chartSpaceHeight)/10)*10-_this.chartSpaceHeight)+'px';//图表实际渲染高度,采用个位数字四舍五入
|
||||
_this.$put('panel/'+ _this.panelIdInner+'/charts/modify',modifyParams).then(response => {
|
||||
if (response.code === 200) {
|
||||
//更新当前图表数据
|
||||
|
||||
Reference in New Issue
Block a user