forked from github/dataease
fix: 横轴标签旋转角度较大时和图表重叠
This commit is contained in:
parent
cde0419330
commit
27ac90b931
@ -593,9 +593,11 @@ export function getXAxis(chart) {
|
||||
stroke: axisCfg.lineStyle.color
|
||||
}
|
||||
} : null
|
||||
const rotate = parseInt(a.axisLabel.rotate)
|
||||
const label = a.axisLabel.show ? {
|
||||
rotate: parseInt(a.axisLabel.rotate) * Math.PI / 180,
|
||||
rotate: rotate * Math.PI / 180,
|
||||
style: {
|
||||
textAlign: rotate > 20 ? 'start' : rotate < -20 ? 'end' : 'center',
|
||||
fill: a.axisLabel.color,
|
||||
fontSize: parseInt(a.axisLabel.fontSize)
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user