Mpandroidchart: Pie problem

Created on 1 Jun 2016  ·  3Comments  ·  Source: PhilJay/MPAndroidChart

hello,when i upgraded to ther latest version,i find a bug in piechart,now,compare two pictures:
v2.2.2
这里写图片描述
v2.2.5
这里写图片描述

a legend as the background,please fix it,thanks!

Code

 PieDataSet pieDataSet = new PieDataSet(yValues, ""/*显示在比例图上*/);
        pieDataSet.setSliceSpace(1f); //设置个饼状图之间的距离
        pieDataSet.setValueLinePart1OffsetPercentage(80.f);
        pieDataSet.setValueLinePart1Length(0.2f);
        pieDataSet.setValueLinePart2Length(0.4f);
        pieDataSet.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
        pieDataSet.setValueLineColor(Color.BLACK);
        ArrayList<Integer> colors = new ArrayList<Integer>();

        // 饼图颜色
        colors.add(Color.rgb(79, 129, 189));
        colors.add(Color.rgb(155,187,89));
        colors.add(Color.rgb(75, 172, 198));
        colors.add(Color.rgb(192,80,77));
        colors.add(Color.rgb(128, 100, 162));

        pieDataSet.setColors(colors);

Most helpful comment

metu

All 3 comments

metu

Have the same problem. Not reproduce for 2.2.2

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JungYongWook picture JungYongWook  ·  3Comments

mrZizik picture mrZizik  ·  3Comments

omensight picture omensight  ·  3Comments

AiTheAnswer picture AiTheAnswer  ·  3Comments

andreyfel picture andreyfel  ·  3Comments