Am using Pie chart in, Charts ios library. I want to know, how can i select first slice by default when it Pie chart loads.
I found this chartView.highlightValue(x: 45, dataSetIndex: 0)
. But this code is not working.
My pie chart has two slices with PieChartDataEntry
. I want first one to be selected by default.
let entries = (0..<count).map { (i) -> PieChartDataEntry in
if i == 0 {
return PieChartDataEntry(value: 45,
label: "")
} else {
return PieChartDataEntry(value: 55,
label: "")
}
}