Fix chart size and clipping

This commit is contained in:
Ilya Laktyushin
2020-03-23 16:55:02 +04:00
parent 4f98fae2ef
commit 13cd7a2ab6
7 changed files with 14 additions and 17 deletions

View File

@@ -197,9 +197,7 @@ class BarChartRenderer: BaseChartRenderer {
leftX = rightX
barIndex += 1
}
let colorOffset = Double((1.0 - (1.0 - generalUnselectedAlpha) * selectedIndexAnimator.current) * chartsAlpha)
for (index, component) in bars.components.enumerated().reversed() {
if maxValues[index] < optimizationLevel {
continue
@@ -209,7 +207,7 @@ class BarChartRenderer: BaseChartRenderer {
context.setLineWidth(self.lineWidth)
context.setStrokeColor(GColor.valueBetween(start: backgroundColorAnimator.current.color,
end: component.color,
offset: colorOffset).cgColor)
offset: 1.0).cgColor)
context.beginPath()
context.addLines(between: backgroundPaths[index])
context.strokePath()