I m trying to set doughnut chart inner circle radius and outter circle radius in aChartengine, below is my code :
public class MainActivity extends Activity {
You have to just chage value of decCoef (variable in DoughnutChart class). In DefaultRenderer add your own radius variable and create getter and setter. now, use this variable in DoughnutChart.
for example ,
DefaultRenderer defaultRenderer = new DefaultRenderer();
defaultRenderer.setmWidth(0.1f);
In DoughnutChart class :
public class DoughnutChart extends RoundChart {
private float mWidth; // make your own variable and initialize in constructor
public DoughnutChart(MultipleCategorySeries dataset, DefaultRenderer renderer) {
super(null, renderer);
mDataset = dataset;
mWidth = renderer.getmWidth();
}
double decCoef = mWidth / cLength; // change value of decCoef by using our variable.