protected PieData generatePieData(){
  int count=4;
  ArrayList<Entry> entries1=new ArrayList<Entry>();
  ArrayList<String> xVals=new ArrayList<String>();
  xVals.add("Quarter 1");
  xVals.add("Quarter 2");
  xVals.add("Quarter 3");
  xVals.add("Quarter 4");
  for (int i=0; i < count; i++) {
    xVals.add("entry" + (i + 1));
    entries1.add(new Entry((float)(Math.random() * 60) + 40,i));
  }
  PieDataSet ds1=new PieDataSet(entries1,"Quarterly Revenues 2014");
  ds1.setColors(ColorTemplate.VORDIPLOM_COLORS);
  ds1.setSliceSpace(2f);
  ds1.setValueTextColor(Color.WHITE);
  ds1.setValueTextSize(12f);
  PieData d=new PieData(xVals,ds1);
  d.setValueTypeface(tf);
  return d;
}

protected PieData generatePieData ( ) { int count = 4 ; ArrayList < Entry > entries1 = new ArrayList < Entry > ( ) ; ArrayList < String > xVals = new ArrayList < String > ( ) ; xVals . add ( "Quarter 1" ) ; xVals . add ( "Quarter 2" ) ; xVals . add ( "Quarter 3" ) ; xVals . add ( "Quarter 4" ) ; for ( int i = 0 ; i < count ; i ++ ) { xVals . add ( "entry" + ( i + 1 ) ) ; entries1 . add ( new Entry ( ( float ) ( Math . random ( ) * 60 ) + 40 , i ) ) ; } PieDataSet ds1 = new PieDataSet ( entries1 , "Quarterly Revenues 2014" ) ; ds1 . setColors ( ColorTemplate . VORDIPLOM_COLORS ) ; ds1 . setSliceSpace ( 2f ) ; ds1 . setValueTextColor ( Color . WHITE ) ; ds1 . setValueTextSize ( 12f ) ; PieData d = new PieData ( xVals , ds1 ) ; d . setValueTypeface ( tf ) ; return d ; }
generates less data ( 1 dataset , 4 values )
