Skip to content

Commit dc6679f

Browse files
wjgogogoqingmo.xwj
and
qingmo.xwj
authored
fix(column): 修复柱状图拆分维度为空字符串时,错误显示了 xField 作为 title 的问题 (#3494)
Co-authored-by: qingmo.xwj <[email protected]>
1 parent 6506771 commit dc6679f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/column/adaptor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function geometry(params: Params<ColumnOptions>): Params<ColumnOptions> {
9999
? {
100100
formatter: (datum: Datum) => ({
101101
name:
102-
isGroup && isStack ? `${datum[seriesField]} - ${datum[groupField]}` : datum[seriesField] || datum[xField],
102+
isGroup && isStack ? `${datum[seriesField]} - ${datum[groupField]}` : datum[seriesField] ?? datum[xField],
103103
value: (Number(datum[yField]) * 100).toFixed(2) + '%',
104104
}),
105105
...tooltip,

0 commit comments

Comments
 (0)