First, you need to add a diagram to your activity and set your preferred image as a background in the action layout. (Take a look at XYChartBuilder at AChartEngineneDemo to see how to do this)
Secondly, set a transparent background for the chart and chart fields:
mRenderer.setApplyBackgroundColor(true); mRenderer.setBackgroundColor(Color.TRANSPARENT); mRenderer.setMarginsColor(getResources().getColor(R.color.transparent_background));
Finally, create your own transparent background, as Color.TRANSPARENT does not work for the chart field:
<color name="transparent_background">#00FF0000</color>
Hope this helps :)
thanhbinh84
source share