mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Update API
This commit is contained in:
parent
efb1110987
commit
0df319742a
69 changed files with 12319 additions and 10209 deletions
|
|
@ -34,6 +34,8 @@ public class GeneralLinesChartController: BaseLinesChartController {
|
|||
private var prevoiusHorizontalStrideInterval: Int = 1
|
||||
|
||||
private(set) var chartLines: [LinesChartRenderer.LineData] = []
|
||||
|
||||
public var min5 = false
|
||||
|
||||
override public init(chartsCollection: ChartsCollection) {
|
||||
self.initialChartCollection = chartsCollection
|
||||
|
|
@ -217,9 +219,18 @@ public class GeneralLinesChartController: BaseLinesChartController {
|
|||
}
|
||||
|
||||
func updateHorizontalLimits(horizontalRange: ClosedRange<CGFloat>, animated: Bool) {
|
||||
if let (stride, labels) = horizontalLimitsLabels(horizontalRange: horizontalRange,
|
||||
scaleType: isZoomed ? .hour : .day,
|
||||
prevoiusHorizontalStrideInterval: prevoiusHorizontalStrideInterval) {
|
||||
var scaleType: ChartScaleType = .day
|
||||
if self.min5 {
|
||||
scaleType = .minutes5
|
||||
} else if isZoomed {
|
||||
scaleType = .hour
|
||||
}
|
||||
|
||||
if let (stride, labels) = horizontalLimitsLabels(
|
||||
horizontalRange: horizontalRange,
|
||||
scaleType: scaleType,
|
||||
prevoiusHorizontalStrideInterval: prevoiusHorizontalStrideInterval
|
||||
) {
|
||||
self.horizontalScalesRenderer.setup(labels: labels, animated: animated)
|
||||
self.prevoiusHorizontalStrideInterval = stride
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue