                     
                     if (innerRadius > 0.0)
                     {
+                        let sliceSpaceInnerAngle = visibleAngleCount == 1 ?
+                            0.0 :
+                            sliceSpace / (ChartUtils.Math.FDEG2RAD * innerRadius)
                         let startAngleInner = rotationAngle + (angle + sliceSpaceInnerAngle / 2.0) * phaseY
                         var sweepAngleInner = (sliceAngle - sliceSpaceInnerAngle) * phaseY
                         if (sweepAngleInner < 0.0)

        
        let entryCount = dataSet.entryCount
        var drawAngles = chart.drawAngles
        let center = chart.centerCircleBox
        let radius = chart.radius
        let innerRadius = drawHoleEnabled && holeTransparent ? radius * holeRadiusPercent : 0.0
        
        CGContextSaveGState(context)
        
        for (var j = 0; j < entryCount; j++)
        {
            let sliceAngle = drawAngles[j]
            let sliceSpace = dataSet.sliceSpace
            let sliceSpaceOuterAngle = sliceSpace / (ChartUtils.Math.FDEG2RAD * radius)
            let sliceSpaceInnerAngle = innerRadius == 0.0 ? 0.0 : sliceSpace / (ChartUtils.Math.FDEG2RAD * innerRadius)
            
            guard let e = dataSet.entryForIndex(j) else { continue }
            

                angle = absoluteAngles[xIndex - 1] * phaseX
            }
            
            let sliceSpace = set.sliceSpace
            
            let sliceAngle = drawAngles[xIndex]
            let sliceSpaceOuterAngle = visibleAngleCount == 1 ?
                0.0 :
                sliceSpace / (ChartUtils.Math.FDEG2RAD * radius)
            
            let shift = set.selectionShift
            let highlightedRadius = radius + shift
