mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix chart line rendering
This commit is contained in:
parent
fce2702c50
commit
0eec0642e3
1 changed files with 5 additions and 3 deletions
|
|
@ -68,7 +68,8 @@ class LinesChartRenderer: BaseChartRenderer {
|
|||
context.setAlpha(alpha)
|
||||
context.setStrokeColor(toLine.color.cgColor)
|
||||
context.setLineWidth(lineWidth)
|
||||
context.setLineCap(.round)
|
||||
|
||||
context.beginTransparencyLayer(auxiliaryInfo: nil)
|
||||
|
||||
if linesShapeAnimator.isAnimating {
|
||||
let animationOffset = linesShapeAnimator.current
|
||||
|
|
@ -315,9 +316,8 @@ class LinesChartRenderer: BaseChartRenderer {
|
|||
lines.removeLast()
|
||||
}
|
||||
|
||||
context.beginTransparencyLayer(auxiliaryInfo: nil)
|
||||
context.setLineCap(.round)
|
||||
context.strokeLineSegments(between: lines)
|
||||
context.endTransparencyLayer()
|
||||
} else {
|
||||
if var index = toLine.points.firstIndex(where: { $0.x >= range.lowerBound }) {
|
||||
var lines: [CGPoint] = []
|
||||
|
|
@ -433,9 +433,11 @@ class LinesChartRenderer: BaseChartRenderer {
|
|||
lines.removeLast()
|
||||
}
|
||||
|
||||
context.setLineCap(.round)
|
||||
context.strokeLineSegments(between: lines)
|
||||
}
|
||||
}
|
||||
context.endTransparencyLayer()
|
||||
context.setAlpha(1.0)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue