update name
This commit is contained in:
parent
cb89795b4c
commit
36cbccd39c
@ -135,7 +135,7 @@ open class DoughnutChart: View {
|
|||||||
let clockwise = true
|
let clockwise = true
|
||||||
|
|
||||||
let value: CGFloat = chartModel.percent
|
let value: CGFloat = chartModel.percent
|
||||||
let gap: CGFloat = spaceReuired() ? lineGap() : 0.0
|
let gap: CGFloat = spaceRequired() ? lineGap() : 0.0
|
||||||
let startAngle = ((prevPercent / 100.0) * 2 * .pi) - (0.5 * .pi)
|
let startAngle = ((prevPercent / 100.0) * 2 * .pi) - (0.5 * .pi)
|
||||||
let endAngle = ((value / 100.0) * 2 * .pi) + startAngle - gap
|
let endAngle = ((value / 100.0) * 2 * .pi) + startAngle - gap
|
||||||
let circlePath = UIBezierPath(arcCenter: arcCenter,
|
let circlePath = UIBezierPath(arcCenter: arcCenter,
|
||||||
@ -168,7 +168,7 @@ open class DoughnutChart: View {
|
|||||||
return doughnutChartModel?.sections.count == 1 ? 0.0 : 0.05
|
return doughnutChartModel?.sections.count == 1 ? 0.0 : 0.05
|
||||||
}
|
}
|
||||||
|
|
||||||
func spaceReuired() -> Bool {
|
func spaceRequired() -> Bool {
|
||||||
return doughnutChartModel?.spaceRequired ?? true
|
return doughnutChartModel?.spaceRequired ?? true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ import Foundation
|
|||||||
centerY.isActive = true
|
centerY.isActive = true
|
||||||
|
|
||||||
colorLablesStack.leadingAnchor.constraint(equalTo: doughnutChart.trailingAnchor, constant: PaddingThree).isActive = true
|
colorLablesStack.leadingAnchor.constraint(equalTo: doughnutChart.trailingAnchor, constant: PaddingThree).isActive = true
|
||||||
colorLablesStack.backgroundColor = UIColor.clear
|
colorLablesStack.backgroundColor = .clear
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func updateView(_ size: CGFloat) {
|
open override func updateView(_ size: CGFloat) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user