我正在制作饼图。由于多个数据,饼图的文本值重叠,如下图所示。我没有得到如何在没有重叠标签的情况下分离出这些数据
我的代码是
pieChartDataSet.colors = colors
pieChartDataSet.valueFormatter = ChartValueFormatter()
pieChartDataSet.valueLinePart1Length = 0.7
pieChartDataSet.valueLinePart2Length = 0.3
//pieChartDataSet.valueLinePart1OffsetPercentage = 80.0
pieChartDataSet.valueLineColor = .black;
pieChartDataSet.valueTextColor = .black;
pieChartDataSet.valueFont = UIFont(name: "Verdana", size: 8.0)!
pieChartDataSet.valueLineVariableLength = true
pieChartDataSet.yValuePosition = .outsideSlice;
pieChartDataSet.xValuePosition = .outsideSlice;