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

[问题] shadowColor属性传参后续会像color属性支持函数吗? #4411

Closed
4 tasks
vobile-wangzhenfeng opened this issue Dec 6, 2022 · 1 comment
Closed
4 tasks

Comments

@vobile-wangzhenfeng
Copy link

Checklist
  • npm test passes
  • benchmarks are included
  • commit message follows commit guidelines
  • documents are updated
Description of change

问题

比如我想实现下面效果时,
image
需要将每个部分的shadowColor与它本身的颜色相对应,但是目前shadowColor属性只能设置一种颜色。

期望

shadowColor: string | ((datum: Datum, defaultColor?: string) => string)

@hustcc
Copy link
Member

hustcc commented Dec 6, 2022

很好的 issue。

目前 4.x 对于 style 回调支持的不是很好,5.0 当前回调可以拿到更多的数据,但是依然没有 defaultColor 数据。如下:

image

我们会在 5.x 中考虑回调中给到更多的上下文信息。

@hustcc hustcc closed this as completed Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants