mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
refactor(图表): 柱状图负值标签显示位置优化 #13172
This commit is contained in:
@@ -137,6 +137,17 @@ export class Bar extends G2PlotChartView<ColumnOptions, Column> {
|
||||
}
|
||||
})
|
||||
return group
|
||||
},
|
||||
position: data => {
|
||||
if (data.value < 0) {
|
||||
if (tmpOptions.label?.position === 'top') {
|
||||
return 'bottom'
|
||||
}
|
||||
if (tmpOptions.label?.position === 'bottom') {
|
||||
return 'top'
|
||||
}
|
||||
}
|
||||
return tmpOptions.label?.position
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user