chore: set path line join style
This commit is contained in:
parent
5b2cdea193
commit
3e9290c5a6
|
@ -94,14 +94,11 @@ extension LineChartView {
|
||||||
if let last = points.last {
|
if let last = points.last {
|
||||||
dotPath.addArc(withCenter: last, radius: 3, startAngle: 0, endAngle: 2 * .pi, clockwise: true)
|
dotPath.addArc(withCenter: last, radius: 3, startAngle: 0, endAngle: 2 * .pi, clockwise: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this not works
|
|
||||||
// linePath.lineJoinStyle = .round
|
|
||||||
// lineShapeLayer.lineJoin = .round
|
|
||||||
|
|
||||||
lineShapeLayer.lineWidth = 3
|
lineShapeLayer.lineWidth = 3
|
||||||
lineShapeLayer.strokeColor = Asset.Colors.brandBlue.color.cgColor
|
lineShapeLayer.strokeColor = Asset.Colors.brandBlue.color.cgColor
|
||||||
lineShapeLayer.fillColor = UIColor.clear.cgColor
|
lineShapeLayer.fillColor = UIColor.clear.cgColor
|
||||||
|
lineShapeLayer.lineJoin = .round
|
||||||
lineShapeLayer.lineCap = .round
|
lineShapeLayer.lineCap = .round
|
||||||
lineShapeLayer.path = linePath.cgPath
|
lineShapeLayer.path = linePath.cgPath
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class CurveAlgorithm {
|
||||||
private func controlPointsFrom(points: [CGPoint]) -> [CurvedSegment] {
|
private func controlPointsFrom(points: [CGPoint]) -> [CurvedSegment] {
|
||||||
var result: [CurvedSegment] = []
|
var result: [CurvedSegment] = []
|
||||||
|
|
||||||
let delta: CGFloat = 0.4
|
let delta: CGFloat = 0.2
|
||||||
|
|
||||||
// only use horizontal control point
|
// only use horizontal control point
|
||||||
for i in 1..<points.count {
|
for i in 1..<points.count {
|
||||||
|
|
Loading…
Reference in New Issue