AnyChart Background Color While Loading

2019-08-17 04:03发布

问题:

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.