gpt4 book ai didi

swift - 显示饼图之外的值

转载 作者:行者123 更新时间:2023-11-30 10:38:04 27 4
gpt4 key购买 nike

我在显示饼图之外的值时遇到问题。目前值(value)观重叠,有什么办法可以改进吗?请参见下图。

chartDataSet.valueLinePart1Length = 0.5
chartDataSet.valueLinePart2Length = 1
//set.xValuePosition = .outsideSlice
chartDataSet.yValuePosition = .outsideSlice

Image

最佳答案

func setupPiChart() {
// This will align label text to top right corner
let l = pieChartView.legend
l.horizontalAlignment = .left
l.verticalAlignment = .bottom
l.orientation = .horizontal
l.xEntrySpace = 10
l.yEntrySpace = 0
l.font = self.isPhone ? Typography.robotoRegular14 : Typography.robotoRegular18

self.pieChartView.entryLabelFont = Typography.robotoRegular14
self.pieChartView.drawHoleEnabled = false
self.pieChartView.drawEntryLabelsEnabled = false
self.pieChartView.notifyDataSetChanged()
}

关于swift - 显示饼图之外的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57480008/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com