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

能否在F2中实现G2类似的渐变填充功能 #243

Closed
dwhdrbdhs opened this issue Aug 13, 2018 · 4 comments
Closed

能否在F2中实现G2类似的渐变填充功能 #243

dwhdrbdhs opened this issue Aug 13, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@dwhdrbdhs
Copy link

  • F2 Version:3.1.17
  • Platform:
  • Mini Showcase(like screenshots):
  • CodePen Link:

F2中若使用canvas生成的线性渐变进行填充,无法满足对每一个值的柱状图内部覆盖全部渐进范围的需求,只可在canvas区域内进行全区域渐变

G2中利用
chart.interval().position('year*sales').style({
fill: 'l(90) 0:#000000 0.5:#7ec2f3 1:#ff0000'
});
的方式即可轻松实现。

求靠谱的解决方式 或功能实现

@simaQ simaQ self-assigned this Aug 14, 2018
@simaQ simaQ added the feature label Aug 14, 2018
@simaQ
Copy link
Contributor

simaQ commented Aug 14, 2018

恩,非常理解,这个问题之前 我也考虑到了,目前的渐变方案是对整个画布生效的。这个功能我这周支持一下,稍等哦

@dwhdrbdhs
Copy link
Author

非常感谢!

@simaQ simaQ added this to the 3.2.1 milestone Aug 16, 2018
@simaQ simaQ closed this as completed in 20b18a9 Aug 20, 2018
simaQ added a commit that referenced this issue Aug 20, 2018
feat: support set gradient color in default. Closed #243.
@simaQ
Copy link
Contributor

simaQ commented Aug 20, 2018

3.2.1-beta.1 版本已经支持。使用范式同 G2,但是注意除去颜色之间的空格,其余不要留有任何空格。

fill: 'l(90) 0:#000000 0.5:#7ec2f3 1:#ff0000'

@mengpangyu
Copy link

恩,非常理解,这个问题之前 我也考虑到了,目前的渐变方案是对整个画布生效的。这个功能我这周支持一下,稍等哦

您好, 渐变色对整个画布生效现在还支持么, 有需求想用到这个

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

No branches or pull requests

3 participants