We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
可视化框架的核心之一就是图元的样式和数据是相关的。数据相关的样式属性是通道,在之前的设计中通道都是在 encode 里面声明,style 就是和数据无关的属性。
当时这么设计的原因是希望用户的心智更加简单:和数据相关的就在 encode 里面声明,否者就在 style 里面声明。但是这样其实存在一些问题:
新的设计就是 style 支持回掉,至于心智的问题加以引导就好:特定通道通过 encode 配置,非特定通道通过 style 配置。
const config = { style: { lineWidth: (d) => (d.value > 10 ? 10 : 1), }, };
The text was updated successfully, but these errors were encountered:
pearmini
No branches or pull requests
配置数据驱动的样式
可视化框架的核心之一就是图元的样式和数据是相关的。数据相关的样式属性是通道,在之前的设计中通道都是在 encode 里面声明,style 就是和数据无关的属性。
存在问题
当时这么设计的原因是希望用户的心智更加简单:和数据相关的就在 encode 里面声明,否者就在 style 里面声明。但是这样其实存在一些问题:
API 设计
新的设计就是 style 支持回掉,至于心智的问题加以引导就好:特定通道通过 encode 配置,非特定通道通过 style 配置。
The text was updated successfully, but these errors were encountered: