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

chart.guide().background().color(), 这里设置渐变色会导致崩溃 #16

Closed
yygutn opened this issue May 31, 2022 · 4 comments
Closed

Comments

@yygutn
Copy link

yygutn commented May 31, 2022

com.antgroup.antv.f2.F2Guide.GuideBackgroundConfigBuilder#color(com.antgroup.antv.f2.F2Util.ColorGradient)

机型:Android 11,华为P50

测试程序:samples

测试代码:
在对比折线图中增加代码:

F2Guide.GuideBackgroundConfigBuilder backgroundConfigBuilder = new F2Guide.GuideBackgroundConfigBuilder();
        backgroundConfigBuilder.color(new F2Util.ColorLinearGradient()
                .addColorStop(0f, "#FF0033")
                .addColorStop(1f, "#FFFFFF")
                .setPosition(0, 0, 0, canvasView.getHeight())
        );
        backgroundConfigBuilder.leftBottom(new String[]{"min", "min"});
        backgroundConfigBuilder.rightTop(new String[]{"2011-12-11", "max"});
@weiqingtangx
Copy link
Collaborator

不好意思,回复晚了。在Guide的Background中颜色暂未支持渐变色的设计,后续会考虑支持。

@yygutn
Copy link
Author

yygutn commented Jun 14, 2022

不好意思,回复晚了。在Guide的Background中颜色暂未支持渐变色的设计,后续会考虑支持。

大概多久,自己尝试给guide#background加了下渐变色的解析支持,发现android和iOS变现不一致- -
iOS的渐变色正常,但是android的这个渐变色变成了全局的渐变色- -

@weiqingtangx
Copy link
Collaborator

这个可能是android canvas画笔的一个bug,设置了渐变色,会影响到全局的画笔。暂时还没有排期。

@yygutn yygutn closed this as completed Jun 22, 2022
@weiqingtangx
Copy link
Collaborator

weiqingtangx commented Jul 6, 2022

渐变色的bug已经修复, 修复版本为 2.1.8。
可以这样引入

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
      implementation 'com.github.antvis:2.1.8'
}

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