title: MPAndroidChart PieChart Angles
body: <p>I needed a pie chart with three entries in the data set so that when i touch the chart it rotates to the correct data( This means it starts at data[0] -> click -> spin to data[1] -> click -> spin to data[2] -> click -> spin to data[0]).</p>
  
  <p>The solution I've implemented goes something like this :</p>
  
  <pre><code>START_OFFSET = 95;
  _index0= absoluteAngles[0] - (drawAngles[0] / 2) - START_OFFSET ;
  _index1= absoluteAngles[1] - (drawAngles[1] / 2) - START_OFFSET ;
  _pendingPieOffset = absoluteAngles[2] - (drawAngles[2] / 2) - START_OFFSET;
  </code></pre>
  
  <p>And here are where the problems start. This supposedly gives me the correct angle as in <code>absoluteAngle</code> represents the end of the slice and <code>drawAngles</code> represents the width of the slice. So even though my math is correct I can't center the center of each slice with the bottom.</p>
  
  <pre><code>      _overlay.setOnClickListener(new View.OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
      ...
  case AVAILABLE_BALANCE:
      _pieChart.spin(SPIN_DURATION, _index2, _index0, Easing.EasingOption.EaseInCubic);
      break;
  case USED_BALANCE:
     _pieChart.spin(SPIN_DURATION, _index0, _index1, Easing.EasingOption.EaseInCubic);
     break;
  case PENDING_BALANCE:
     _pieChart.spin(SPIN_DURATION, _index1, _index0, Easing.EasingOption.EaseInCubic);
      break;
      ....
      }
  </code></pre>