Merge pull request #7570 from ulleo/dev

fix: 区间条形图纵轴标签和轴线重合
This commit is contained in:
ulleo 2024-01-10 16:21:40 +08:00 committed by GitHub
commit c0a65a8639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -711,13 +711,23 @@ export function getXAxis(chart) {
}
} : null
const position = transAxisPosition(chart, a)
if (a.axisLabel.show && chart.type === 'bidirectional-bar') {
label.rotate = 0
label.style.textAlign = 'start'
}
if (a.axisLabel.show && chart.type === 'bar-time-range') {
label.rotate = 0
if (position === 'top') {
label.style.textAlign = 'start'
} else {
label.style.textAlign = 'end'
}
}
axis = {
position: transAxisPosition(chart, a),
position: position,
title: title,
grid: grid,
label: label,