protected void drawCenterText(Canvas c){
  String centerText=mChart.getCenterText();
  if (mChart.isDrawCenterTextEnabled() && centerText != null) {
    PointF center=mChart.getCenterCircleBox();
    String[] lines=centerText.split("\n");
    float maxlineheight=0f;
    for (    String line : lines) {
      float curHeight=Utils.calcTextHeight(mCenterTextPaint,line);
      if (curHeight > maxlineheight)       maxlineheight=curHeight;
    }
    float linespacing=maxlineheight * 0.25f;
    float totalheight=maxlineheight * lines.length - linespacing * (lines.length - 1);
    int cnt=lines.length;
    float y=center.y;
    for (int i=0; i < lines.length; i++) {
      String line=lines[lines.length - i - 1];
      c.drawText(line,center.x,y + maxlineheight * cnt - totalheight / 2f,mCenterTextPaint);
      cnt--;
      y-=linespacing;
    }
  }
}

protected void drawCenterText ( Canvas c ) { String centerText = mChart . getCenterText ( ) ; if ( mChart . isDrawCenterTextEnabled ( ) && centerText != null ) { PointF center = mChart . getCenterCircleBox ( ) ; String [ ] lines = centerText . split ( "\n" ) ; float maxlineheight = 0f ; for ( String line : lines ) { float curHeight = Utils . calcTextHeight ( mCenterTextPaint , line ) ; if ( curHeight > maxlineheight ) maxlineheight = curHeight ; } float linespacing = maxlineheight * 0.25f ; float totalheight = maxlineheight * lines . length - linespacing * ( lines . length - 1 ) ; int cnt = lines . length ; float y = center . y ; for ( int i = 0 ; i < lines . length ; i ++ ) { String line = lines [ lines . length - i - 1 ] ; c . drawText ( line , center . x , y + maxlineheight * cnt - totalheight / 2f , mCenterTextPaint ) ; cnt -- ; y -= linespacing ; } } }
draws the description text in the center of the pie chart makes most sense when center - hole is enabled
