Various fixes

This commit is contained in:
Ilya Laktyushin
2023-11-23 00:06:05 +04:00
parent 19d88aafcc
commit 2479b79da2
5 changed files with 29 additions and 18 deletions

View File

@@ -181,7 +181,7 @@ class ChartStackSection: UIView, ChartThemeContainer {
self.chartView.setNeedsDisplay()
}
func setup(controller: BaseChartController, displayRange: Bool = true) {
func setup(controller: BaseChartController, displayRange: Bool = true, zoomToEnding: Bool = true) {
self.controller = controller
self.displayRange = displayRange
@@ -246,7 +246,7 @@ class ChartStackSection: UIView, ChartThemeContainer {
controller.initializeChart()
updateToolViews(animated: false)
let range: ClosedRange<CGFloat> = displayRange ? 0.8 ... 1.0 : 0.0 ... 1.0
let range: ClosedRange<CGFloat> = displayRange && zoomToEnding ? 0.8 ... 1.0 : 0.0 ... 1.0
rangeView.setRange(range, animated: false)
controller.updateChartRange(range, animated: false)