fix
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 10s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

This commit is contained in:
SunCheng
2026-01-17 15:10:37 +08:00
parent 0ef4b52fcc
commit 1b3d01c78c

View File

@@ -387,10 +387,10 @@ const updateVarianceChart = (chart, budgets) => {
type: 'bar',
stack: 'Total',
barWidth: 20, // Fixed bar width
data: values.map((val, index) => {
// 如果柱子太短(小于15%),文字显示在外部,否则显示在内部
data: values.map((val) => {
// 如果柱子太短(小于25%),文字显示在外部,否则显示在内部
const ratio = Math.abs(val) / maxVal
const isShort = ratio < 0.15
const isShort = ratio < 0.25
let position
let color
@@ -400,6 +400,7 @@ const updateVarianceChart = (chart, budgets) => {
position = isShort ? 'left' : 'insideRight'
}
// eslint-disable-next-line prefer-const
color = isShort ? textColor : '#fff'
return {