加载时的AnyChart背景色 [英] AnyChart Background Color While Loading

查看:162
本文介绍了加载时的AnyChart背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的 android应用使用AnyChart API:

I am using AnyChart API for my android app:

Github

在构建图表时,我不知道如何设置背景颜色。我尝试了所有不同的背景设置,但是都没有解决我的问题。每次图表加载数据时,我都会有大约1-2秒的白色空白。

I can't figure out how to set up the background color while the chart is building. I tried all of the different background setting but none resolved my problem. Everytime the chart is loading data I have a white blank space for about 1-2 sec.

带有空白的示例:
图表1
图表2

查看秒后:
图表1
图表2

我希望有人知道解决方案,或者至少有可能改变它。

I hope someone knows the solution or at least if that is even possible to change it.

推荐答案

我们已考虑到您的问题,并准备了图书馆的更新。请下载该库的最新版本。现在,您可以用一种颜色填充背景,直到图表呈现如下:

We took into account your issue and have prepared an update of the library. Please, download the latest version of the library. Now you can fill the background with a color until the chart rendered like this:

anyChartView.setBackgroundColor( black); //或#000000

此外,您还可以显示进度图渲染图,如下所示:

Also, you can show a progress bar of rendering the chart like this:

ProgressBar progressBar = findViewById(R.id.progress_bar);
anyChartView.setProgressBar(progressBar);

您可以使用自定义栏设置自己的视图。

You can set your own view with your custom bar.

这篇关于加载时的AnyChart背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆