AnyChart Background Color While Loading

核能气质少年 提交于 2019-12-25 03:13:18

问题


I am using AnyChart API for my android app:

Github

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.

Examples with white space: Chart 1, Chart 2

After view seconds: Chart 1, Chart 2

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


回答1:


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"); // or "#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.



来源:https://stackoverflow.com/questions/49865017/anychart-background-color-while-loading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!