gpt4 book ai didi

android - 如何去除饼图中的中心白圈

转载 作者:行者123 更新时间:2023-12-04 12:12:10 24 4
gpt4 key购买 nike

我在我的 Android 应用程序中制作了一个饼图,中间有一个白色的 cerce 我试图删除它,但我无法 t even the piechart.setCentralCirculaire` 在我的代码中不起作用。反正我能做到吗谢谢。

Chart

pieChart=(PieChart)findViewById(R.id.Piechart);
pieChart.setRotationEnabled(true);

addDataSet();

private void addDataSet(){
Log.d(TAG, "addDataSet: ");
ArrayList<PieEntry> yEntrys=new ArrayList<>();
yEntrys.add(new PieEntry(15.0f, "LOW"));
yEntrys.add(new PieEntry(50.0f,"Normal"));
yEntrys.add(new PieEntry(25.0f,"hyper"));
PieDataSet pieDataSet= new PieDataSet(yEntrys,"Employee Global Activity");
pieDataSet.setSliceSpace(2);
pieDataSet.setValueTextSize(12);
ArrayList<Integer> colors =new ArrayList<>();
colors.add(Color.RED);
colors.add(Color.BLUE);
colors.add(Color.GREEN);
pieDataSet.setColors(colors);
PieData pieData =new PieData(pieDataSet);
pieChart.setData(pieData);
pieChart.invalidate();
}

最佳答案

piechart.setDrawHoleEnabled(false);

关于android - 如何去除饼图中的中心白圈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42415386/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com