mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Chart fixes
This commit is contained in:
parent
8f06ccb9ec
commit
0453d6f933
@ -164,7 +164,7 @@ public class TwoAxisStepBarsChartController: BaseLinesChartController {
|
||||
super.chartInteractionDidBegin(point: point)
|
||||
|
||||
var barOffset: CGFloat = 0.0
|
||||
for graphController in graphControllers {
|
||||
for (index, graphController) in graphControllers.enumerated() {
|
||||
var bullets: [LineBulletsRenderer.Bullet] = []
|
||||
if let component = graphController.chartBars.components.first {
|
||||
let location = graphController.chartBars.locations[minIndex]
|
||||
@ -175,8 +175,10 @@ public class TwoAxisStepBarsChartController: BaseLinesChartController {
|
||||
|
||||
bullets.append(LineBulletsRenderer.Bullet(coordinate: CGPoint(x: location, y: value), offset: CGPoint(x: offset, y: 0.0), color: component.color))
|
||||
}
|
||||
let isVisible = chartVisibility[index]
|
||||
graphController.lineBulletsRenderer.bullets = bullets
|
||||
graphController.lineBulletsRenderer.isEnabled = true
|
||||
graphController.lineBulletsRenderer.setLineVisible(isVisible, at: 0, animated: false)
|
||||
}
|
||||
|
||||
let chartValue: CGFloat = CGFloat(closestDate.timeIntervalSince1970)
|
||||
|
@ -138,7 +138,7 @@ class PieChartRenderer: BaseChartRenderer {
|
||||
let maximumFontSize: CGFloat = radius / 7
|
||||
let minimumFontSize: CGFloat = 4
|
||||
let centerOffsetStartAngle = CGFloat.pi / 4
|
||||
let minimumValueToDraw: CGFloat = 1.01
|
||||
let minimumValueToDraw: CGFloat = 0.015
|
||||
let diagramRadius = radius - animationSelectionOffset
|
||||
|
||||
let numberOfVisibleItems = currentlyVisibleData.filter { $0.value > 0 }.count
|
||||
|
Loading…
x
Reference in New Issue
Block a user