Skip to content

Commit

Permalink
Update CardPartHistogramView.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgrier authored Jul 27, 2020
1 parent 14b491c commit d340377
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public class CardPartHistogramView: UIView, CardPartView {
func computeSpacing(dataEntries: [DataEntry]) -> CGFloat {
scrollView.layoutIfNeeded()
let divideCount = dataEntries.count > 1 ? (CGFloat(dataEntries.count) - 1) : 1
return (scrollView.bounds.width - (CGFloat(dataEntries.count) * width) / divideCount)
return (scrollView.bounds.width - (CGFloat(dataEntries.count) * width)) / divideCount
}
}

Expand Down

0 comments on commit d340377

Please sign in to comment.