diff --git a/MVMCoreUI/Molecules/Doughnut/DoughnutChart.swift b/MVMCoreUI/Molecules/Doughnut/DoughnutChart.swift index 130536e4..51532228 100644 --- a/MVMCoreUI/Molecules/Doughnut/DoughnutChart.swift +++ b/MVMCoreUI/Molecules/Doughnut/DoughnutChart.swift @@ -176,7 +176,7 @@ open class DoughnutChart: View { labelContainer.layoutIfNeeded() let radius = sizeObject.getValueBasedOnApplicationWidth()/2 - lineWidth() let labelheight = labelContainer.frame.height/2 - let padding = sizeObject.getValueBasedOnApplicationWidth()/2 - sqrt(pow(radius, 2) - pow(labelheight, 2)) + let padding = sizeObject.getValueBasedOnApplicationWidth()/2 - sqrt(abs(pow(radius, 2) - pow(labelheight, 2))) labelContainerLeftConstraint?.constant = padding labelContainerRightConstraint?.constant = padding