Search code examples
iosswiftios-charts

How to stretch PieChartView the entire width and length of the parent View


I use the following charts library and have the following custom control:

enter image description here

But after chart loaded i got the following picture:

enter image description here

Its obvious that PieChartView has greater sizes than output chart. My question is how to make final chart to occupy entire PieChartView?


Solution

  • Found a solution. When configuring PieChartDataSet

    let set = PieChartDataSet(...)
    //configuring
    

    and set selectionShift of the set to the zero (selection of the slices will be disabled)

    set.selectionShift = 0