Merge pull request #13522 from dataease/pr@dev-v2@chart-title-fix

fix(图表): 修复图表在不显示标题时,显示联动、跳转等标识的图标占用图表高度,导致图表出现抖动假相的问题 #11156 #12112
This commit is contained in:
dataeaseShu 2024-11-25 11:15:05 +08:00 committed by GitHub
commit 630097792c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -879,6 +879,9 @@ const toolTip = computed(() => {
})
const marginBottom = computed<string | 0>(() => {
if (!titleShow.value) {
return 0
}
if (titleShow.value || trackMenu.value.length > 0 || state.title_remark.show) {
return 12 * scale.value + 'px'
}
@ -890,8 +893,22 @@ const iconSize = computed<string>(() => {
})
const titleIconStyle = computed(() => {
//
const style = {
position: 'absolute',
color: 'rgb(255, 252, 252)',
position: 'absolute',
border: '1px solid rgb(173, 170, 170)',
'background-color': 'rgba(173, 170, 170)',
'border-radius': '2px',
padding: '0 2px 0 2px',
top: '2px',
'z-index': 1,
left: '6px'
}
return {
color: canvasStyleData.value.component.seniorStyleSetting.linkageIconColor
color: canvasStyleData.value.component.seniorStyleSetting.linkageIconColor,
...(titleShow.value ? {} : style)
}
})
const chartHover = ref(false)