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

annotation text content 的回调参数应该需要有 x y 的值 #2805

Closed
hustcc opened this issue Sep 8, 2020 · 2 comments
Closed

annotation text content 的回调参数应该需要有 x y 的值 #2805

hustcc opened this issue Sep 8, 2020 · 2 comments
Assignees

Comments

@hustcc
Copy link
Member

hustcc commented Sep 8, 2020

如图:

image


建议的写法:

chart.annotation().text({
  text: {
    position: ['min', 'median'],
    content: '中位数值:${y}',
//    content: (params) => {
//        return `中位数值:${params.y}`,
//    }
  }
})
@visiky
Copy link
Member

visiky commented Sep 26, 2020

这是现在的结构:
image

1⃣️ 考虑下统一回调参数?
2⃣️ x, y 代表原始数据,还是坐标信息

@hustcc @simaQ

@hustcc
Copy link
Member Author

hustcc commented Sep 26, 2020

这是现在的结构:
image

1⃣️ 考虑下统一回调参数?
2⃣️ x, y 代表原始数据,还是坐标信息

@hustcc @simaQ

感觉还是要加一个 object 参数,扩展方便不会 break~

@hustcc hustcc assigned hustcc and unassigned visiky and lxfu1 Jan 29, 2021
@hustcc hustcc closed this as completed Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants