Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

进行groupX聚合运算的图表,添加对应属性的数据标签label显示不正确 #6248

Closed
CODPHISH opened this issue May 29, 2024 · 2 comments · Fixed by #6250
Closed
Assignees
Labels

Comments

@CODPHISH
Copy link

问题描述

image
如图中所示,官方示例中仅添加.label({text: 'price'}),数据标签显示的仍是原始数据,而非聚合后的数据

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@pearmini pearmini added the Bug label May 29, 2024
@pearmini pearmini self-assigned this May 29, 2024
@pearmini
Copy link
Member

这应该是一个 bug,我看看有没有办法解决。

@pearmini
Copy link
Member

pearmini commented May 29, 2024

@CODPHISH 这个 PR #6250 引入了新的 API 解决了这个问题:

chart.interval().label({ 
  text: (d, i, data, {channel}) => channel.y[i]
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants