5

I am Using achartengine api for drawing piechart. Defaultly the Piechart displays in the center but I want to move it to the left corner of the layout I used the "setMargin()" but it does not work.

Saravanapandi_PSP
  • 351
  • 1
  • 3
  • 11

1 Answers1

3

If you are creating the PieChart instance yourself then you can set the centerX and centerY of the chart to change its location.

PieChart chart = new PieChart(dataset, renderer);
chart.setCenterX(someValue);
chart.setCenterY(someValue);
mChartView = new GraphicalView(context, chart);
Dan D.
  • 32,246
  • 5
  • 63
  • 79