DonutChart is a customised pie chart library.
- Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add the dependency:
implementation 'com.github.ruthwikkk:donutchart:{latest_version}'
Find the latest version here
- Add it to your layout:
<com.ruthwikkk.widget.donutchart.DonutChart
android:id="@+id/donut_chart"
android:layout_width="300dp"
android:layout_height="300dp"
app:animationDuration="3000"
app:correctPercentage="70"
app:donutSmallWidth="10dp"
app:donutWidth="75dp"
app:separatorAngle="1"
app:textPadding="40dp"
app:unAnsweredPercentage="10"
app:wrongPercentage="20">
</com.ruthwikkk.widget.donutchart.DonutChart>