我正在尝试使用MpAndroidChart库绘制带有圆角的饼图。
期望的输出与此类似。
两端都必须是外圆。有一个方法pieChart.setDrawRoundedSlices(true),但是问题是饼图的内圆开始。
这是实际输出。
// initialise pie chart UI
fun initChart(mChart: PieChart) {
mChart.description.isEnabled = false
mChart.holeRadius = 75f
mChart.transparentCircleRadius = 60f
mChart.setHoleColor(Color.TRANSPARENT)
mChart.legend.isEnabled = false
mChart.isRotationEnabled = false
mChart.setTouchEnabled(false)
mChart.maxAngle = 270f
mChart.rotation = -135f
mChart.animateX(400)
mChart.setDrawRoundedSlices(true)
}
如何使用MpAndroidChart设置这种单循环进度条?