Skip to content

Commit

Permalink
fix(column): 修复柱状图拆分维度为空字符串时,错误显示了 xField 作为 title 的问题 (#3494)
Browse files Browse the repository at this point in the history
Co-authored-by: qingmo.xwj <qingmo.xwj@alibaba-inc.com>
  • Loading branch information
wjgogogo and qingmo.xwj committed Mar 16, 2023
1 parent 6506771 commit dc6679f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plots/column/adaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function geometry(params: Params<ColumnOptions>): Params<ColumnOptions> {
? {
formatter: (datum: Datum) => ({
name:
isGroup && isStack ? `${datum[seriesField]} - ${datum[groupField]}` : datum[seriesField] || datum[xField],
isGroup && isStack ? `${datum[seriesField]} - ${datum[groupField]}` : datum[seriesField] ?? datum[xField],
value: (Number(datum[yField]) * 100).toFixed(2) + '%',
}),
...tooltip,
Expand Down

0 comments on commit dc6679f

Please sign in to comment.