mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix chart colors
This commit is contained in:
parent
bdada453ad
commit
45cdcfba15
6 changed files with 17 additions and 12 deletions
|
|
@ -59,7 +59,8 @@ class LinesChartRenderer: BaseChartRenderer {
|
|||
if chartsAlpha == 0 { return }
|
||||
let range = renderRange(bounds: bounds, chartFrame: chartFrame)
|
||||
|
||||
context.clip(to: CGRect(origin: CGPoint(x: 0.0, y: chartFrame.minY), size: CGSize(width: chartFrame.width + chartFrame.origin.x * 2.0, height: chartFrame.height)))
|
||||
let spacing: CGFloat = 1.0
|
||||
context.clip(to: CGRect(origin: CGPoint(x: 0.0, y: chartFrame.minY - spacing), size: CGSize(width: chartFrame.width + chartFrame.origin.x * 2.0, height: chartFrame.height + spacing * 2.0)))
|
||||
|
||||
for (index, toLine) in toLines.enumerated() {
|
||||
let alpha = linesAlphaAnimators[index].current * chartsAlpha
|
||||
|
|
|
|||
|
|
@ -101,6 +101,10 @@ class VerticalScalesRenderer: BaseChartRenderer {
|
|||
let labelColorAlpha = labelsColor.alphaValue
|
||||
|
||||
func drawLines(_ labels: [LinesChartLabel], alpha: CGFloat) {
|
||||
var labels = labels
|
||||
if labels.count > 1 {
|
||||
labels.removeFirst()
|
||||
}
|
||||
var lineSegments: [CGPoint] = []
|
||||
let x0 = chartFrame.minX
|
||||
let x1 = chartFrame.maxX
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue