Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/196.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在饼图上显示详细信息_Android_Pie Chart - Fatal编程技术网

Android 在饼图上显示详细信息

Android 在饼图上显示详细信息,android,pie-chart,Android,Pie Chart,我需要一个饼图,如下所示 我搜索了很多,但我能找到的最相似的案例是 有什么想法吗?你可以试试这个 Pi图 你可以点击链接 <view android:layout_width="300dp" android:layout_height="wrap_content" class="im.dacer.androidcharts.PieView" android:id="@+id/pie_view" /> PieView pieView = (PieView)findViewB

我需要一个饼图,如下所示

我搜索了很多,但我能找到的最相似的案例是

有什么想法吗?

你可以试试这个

Pi图

你可以点击链接

  <view
android:layout_width="300dp"
android:layout_height="wrap_content"
class="im.dacer.androidcharts.PieView"
android:id="@+id/pie_view" />


PieView pieView = (PieView)findViewById(R.id.pie_view);
ArrayList<PieHelper> pieHelperArrayList = new ArrayList<PieHelper>();
pieView.setDate(pieHelperArrayList);
pieView.selectedPie(2); //optional
pieView.setOnPieClickListener(listener) //optional
pieView.showPercentLabel(false); //optional

PieView PieView=(PieView)findViewById(R.id.pie\u视图);
ArrayList pieHelperArrayList=新的ArrayList();
设置日期(pieHelperArrayList);
pieView.selectedPie(2)//可选择的
pieView.setOnPieClickListener(listener)//可选
pieView.showPercentLabel(假)//可选择的


你也可以遵循这个例子

嗨,试试这个,这里有一个关于如何使用它的教程,我已经看过了。我需要精确的饼图,如图一所示。@Tony谢谢。我找到了一个链接。我会检查并告诉你。试试这个动态创建。。。