在andorid中创建圆弧图/进度条,例如arc [英] Creating Pie chart / progressbar like arc in andorid
问题描述
我正在一个项目中,我想显示一个饼状图(如添加的图像).已经在stackoverflow中搜索了Google和其他帖子,但是找不到解决方案.任何解决方案都值得赞赏.
注意:也欢迎第三方库的建议.另外,请不要建议MPAndroidChart,因为我认为可以使用更简单的方法来实现我的查询.
您可以使用库
I am working on a project where I want to show a pie chart like the image added. Already have searched google and other posts in stackoverflow, but could not find a solution. any solution is appreciated.
Note: suggestions of third-party library are also welcome. Also please do not suggest MPAndroidChart as I think my query can be implemented using simpler method.
You can use the library https://github.com/PhilJay/MPAndroidChart to achieve this.
Add below in xml:
<com.github.mikephil.charting.charts.PieChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="match_parent" />
In java code:
PieChart chart = (Piechart) findViewById(R.id.chart);
Example code:
There are lot of variances available.
Another library to consider is:
https://github.com/lecho/hellocharts-android
这篇关于在andorid中创建圆弧图/进度条,例如arc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!