I have created in my application pie chart using AChartEngine. I have written it in this way:
private GraphicalView graphicalView;
private CategorySeries categorySeries = new CategorySeries("");
private DefaultRenderer defaultRenderer = new DefaultRenderer();
private void setUpPieCharts() {
defaultRenderer.setApplyBackgroundColor(true);
defaultRenderer.setBackgroundColor(Color.TRANSPARENT);
defaultRenderer.setZoomButtonsVisible(false);
defaultRenderer.setZoomEnabled(false);
defaultRenderer.setPanEnabled(false);
defaultRenderer.setStartAngle(130);
defaultRenderer.setShowLabels(false);
defaultRenderer.setShowLegend(false);
categorySeries.add("Series " + (categorySeries.getItemCount() + 1), 150);
SimpleSeriesRenderer renderer = new SimpleSeriesRenderer();
renderer.setColor(COLORS[(categorySeries.getItemCount() - 1) % COLORS.length]);
defaultRenderer.addSeriesRenderer(renderer);
categorySeries.add("Series " + (categorySeries.getItemCount() + 1), 50);
renderer = new SimpleSeriesRenderer();
renderer.setColor(COLORS[(categorySeries.getItemCount() - 1) % COLORS.length]);
defaultRenderer.addSeriesRenderer(renderer);
LinearLayout layout = (LinearLayout) findViewById(R.id.chart_1);
graphicalView = ChartFactory.getPieChartView(this, categorySeries, defaultRenderer);
//defaultRenderer.setStartAngle(90);
layout.addView(graphicalView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
}
It works quite good. But setStartAngle() method seems to be not working. I have tried with few values but my pie chart still looks the same. What am I doing wrong?
EDIT


I have uploaded two screenshots with calling and without calling this method. For convenience I have added also this line for my activity:
Toast.makeText(getApplicationContext(), String.valueOf(defaultRenderer.getStartAngle()), Toast.LENGTH_LONG).show();
Pie chart still looks the same.
It seems like your code is calling the setStartAngle twice, once with 130 and another time with 90. I think it will always display with start angle = 90.
I have just tried it in the ACE demo application and it works.
OK, I finally managed to see where the issue is. You are running on AChartEngine 1.0.0 which was released in March. The start angle API was there, but it was not working for PieChart and this was fixed in May: http://code.google.com/p/achartengine/source/detail?r=386
In order to have it work, you will have to checkout the AChartEngine code and do a build yourself by running ant dist