You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have been forced to implement my own Renderer for BarChartView. I need to draw bars a little differently. It was all fine until I needed to animate data refresh and then I found a problem.
I found out that no matter what Renderer I use e.g. BarChartRenderer, if I create it and pass to renderer property of BarChartView it will never be able to animate. Is there any bug that I just encountered?
My code for passing new renderer for a BarChartView:
`guard let chartView = _barChartView else { return }
If I never touch the renderer property it will animate perfectly. What am I doing wrong ?
I dived into implementation of ChartViewBase and found a delegate for animator, thought that was my mistake but here I have no more ideas.
Searched for issues with custom renderer. Thank you for help and I hope someone can answer so I can fix my potentialy stupid mistake here.
Charts version/Branch/Commit Number: 3.0.5 Xcode version: 9.2 Swift version: 4.0 Platform(s) running Charts: iOS 11.2 macOS version running Xcode:
The text was updated successfully, but these errors were encountered:
Found a solution.
animator passed to renderer should not be created but take from chartView.chartAnimator like below: BarChartRenderer(dataProvider: chartView, animator: chartView.chartAnimator, viewPortHandler: viewPort)
Hi,
I have been forced to implement my own Renderer for BarChartView. I need to draw bars a little differently. It was all fine until I needed to animate data refresh and then I found a problem.
I found out that no matter what Renderer I use e.g. BarChartRenderer, if I create it and pass to renderer property of BarChartView it will never be able to animate. Is there any bug that I just encountered?
My code for passing new renderer for a BarChartView:
`guard let chartView = _barChartView else { return }
If I never touch the renderer property it will animate perfectly. What am I doing wrong ?
I dived into implementation of ChartViewBase and found a delegate for animator, thought that was my mistake but here I have no more ideas.
Searched for issues with custom renderer. Thank you for help and I hope someone can answer so I can fix my potentialy stupid mistake here.
Charts version/Branch/Commit Number: 3.0.5
Xcode version: 9.2
Swift version: 4.0
Platform(s) running Charts: iOS 11.2
macOS version running Xcode:
The text was updated successfully, but these errors were encountered: