Android - change the background color of achartingin

Is there a way to change the background color in a chart when using achartengine? Currently, it displays all graphs with a black background. I looked at GraphicalActivity.java but could not find a solution. Is anyone

+7
source share
3 answers

in GraphicalView.java onDraw() add this line

 mRenderer.setApplyBackgroundColor(true); mRenderer.setBackgroundColor(Color.RED); 

he will work

+17
source

You can add it and enjoy it!

 mRenderer.setMarginsColor(Color.RED); 
+4
source

The answer is correct, but you do not need to do this in GraphicalView.java. You must do this in your own class by creating a render for the chart.

+1
source

All Articles