带有圆角的MpAndroidChart饼图

问题描述 投票:0回答:1

我正在尝试使用MpAndroidChart库绘制带有圆角的饼图。

期望的输出与此类似。

enter image description here

两端都必须是外圆。有一个方法pieChart.setDrawRoundedSlices(true),但是问题是饼图的内圆开始。

这是实际输出。

enter image description here

// 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)
}
android charts material-design pie-chart mpandroidchart
1个回答
0
投票

如何使用MpAndroidChart设置这种单循环进度条?

© www.soinside.com 2019 - 2024. All rights reserved.