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