fix(图表): 修复多维散点图中横轴名称显示逻辑

This commit is contained in:
jianneng-fit2cloud
2026-04-08 10:33:56 +08:00
committed by jianneng-fit2cloud
parent 95b6bedfc9
commit 2fb2e4bc2b

View File

@@ -414,7 +414,10 @@ export class MultiScatter extends G2PlotChartView<ScatterOptions, G2Scatter> {
const value = isTimeStr
? String(rawValue)
: valueFormatter(parseFloat(String(rawValue)), formatter.formatterCfg)
const name = isEmpty(formatter.chartShowName) ? formatter.name : formatter.chartShowName
let name = isEmpty(formatter.chartShowName) ? formatter.name : formatter.chartShowName
if (fieldKey === 'x') {
name = xFieldName
}
result.push({ color: pointColor, name, value, marker: true })
})
datum.dynamicTooltipValue?.forEach(item => {