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

type: 'arc'下fillStyle失效 #429

Closed
cydiacen opened this issue Nov 29, 2018 · 9 comments
Closed

type: 'arc'下fillStyle失效 #429

cydiacen opened this issue Nov 29, 2018 · 9 comments
Labels
Milestone

Comments

@cydiacen
Copy link

  • F2 Version:3.3.0
  • Platform:web
  • Mini Showcase(like screenshots):
  • CodePen Link:https://antv.alipay.com/zh-cn/f2/3.x/demo/radar/line.html
    具体问题就是上面链接是官方的链接,直接在138行增加一条代码fillStyle:'#cd0200',
    目的是为了实现按区域显示背景色(代码上可以用rgba但是为了方便 直接没有透明通道的颜色 一样有问题),可是这段代码添加上去是没有效果的,感觉好像跟type: 'arc'有冲突,去掉type: 'arc'又是有效果的,可是我现在的场景就是需要圆形的雷达图。
    望解答!谢谢!
@simaQ
Copy link
Contributor

simaQ commented Nov 30, 2018

我们的网格线不支持颜色填充,只能设置线的颜色,即 stroke

@cydiacen
Copy link
Author

我试过了 如果没有type: 'arc'是支持填充的 加了就不支持 ,后期有优化的打算吗 起码应该体验一致嘛 对吧,一种有 一种没有 给人的感觉就是会不会是自己用错了 或者代码有bug

@simaQ
Copy link
Contributor

simaQ commented Nov 30, 2018

我们对于 fill 填充确实不支持,这个并不是我们预期的。对于表现不一致的问题这个确实需要优化一下。

@simaQ simaQ added this to the 3.3.1 milestone Nov 30, 2018
@simaQ simaQ closed this as completed in dc4981f Nov 30, 2018
simaQ added a commit that referenced this issue Nov 30, 2018
fix: Arc shape support fill. Closed #429.
@simaQ
Copy link
Contributor

simaQ commented Nov 30, 2018

@cydiacen@antv/f2@3.3.1 版本已经修复,type: 'arc' 与非 arc 表现一致,均支持填充。

@cydiacen
Copy link
Author

@simaQ 那么请问下 my-f2的项目会同步更新吗 因为我用的是钉钉小程序

@cydiacen
Copy link
Author

@simaQ 我也尝试了在node_module里面对应的文件 添加了 this._attrs.canFill = true; 但是好像 并没有效果。。讲道理用这种方式也是可行的吧 毕竟小程序上传是包含node_module

@simaQ
Copy link
Contributor

simaQ commented Nov 30, 2018

... 你使用的 my-f2 是什么版本? 1.1.4 是话你重新安装下会更新到最新版的 https://github.com/antvis/my-f2/blob/1.1/package.json#L94

@cydiacen
Copy link
Author

@simaQ emmm 在官网demo上 更改了版本号之后进行测试 是可行的 但是在小程序上 却没有效果。。。我去node_module里也检查了下 确实是新的代码。。可是弧形还是不能填充。。

@cydiacen
Copy link
Author

我发现是因为 my-f2的包里的build/my-f2.js 不是最新版导致的 因为在小程序的IDE里面引用的是这个文件

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

2 participants