fix(图表): 修复对称条形图null值有柱体显示不正确的问题

This commit is contained in:
jianneng-fit2cloud
2026-03-10 18:20:29 +08:00
parent 7491d1288a
commit d6b6adfbc0

View File

@@ -341,12 +341,22 @@ export class BidirectionalHorizontalBar extends G2ChartView {
}
defaultsDeep(firstMark, {
style: {
fill: firstColor
fill: d => {
if (d.value === null || d.value === undefined) {
return 'transparent'
}
return firstColor
}
}
})
defaultsDeep(secondMark, {
style: {
fill: secondColor
fill: d => {
if (d.value === null || d.value === undefined) {
return 'transparent'
}
return secondColor
}
}
})
return options