Pre loader

SCIAnimation completion block

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


In Scichart 2, we had some code that added some annotations in the SCIAnimation completion block. Here’s a snippet. We need the self.renderAnnotations() to happen AFTER the chart data range is set, because we only draw annotations that will fit within the individual bar stack elements.

        SCIUpdateSuspender.usingWithSuspendable(sciChartSurface) {
            if hasBarData {  
                let animation = SCIWaveRenderableSeriesAnimation(duration: 1, curveAnimation: .easeOut)
                animation.completionHandler = {
                    self.configurationButtons?.forEach { $0.isUserInteractionEnabled = true }

Here’s the current rewrite to run under Scichart 4. With this code, yAxisLeft.visibleRange has not been updated to the correct data range when renderAnnotations() is called.

Uncommenting the 3 animator-related lines near the bottom doesn’t make a difference, and my listener function is never called.

I’ve also tried wrapping the renderAnnotations() call in a DispatchQueue.main.asyncAfter() call. That sometimes works, and sometimes results in renderAnnotations() not being called at all.

How do I get renderAnnotations() (and the following line looping on configurationButtons) to run, reliably, after the axis range setup is complete?

How do I get my wave animation back?

        SCIUpdateSuspender.usingWith(sciChartSurface) {
            if hasBarData { 
                self.configurationButtons?.forEach { $0.isUserInteractionEnabled = true }
//                let animator = SCIAnimations.createWaveAnimator(for: columnCollection)
//                animator.add(self)
//                animator.start()
  • You must to post comments

Hi, there.

You can do it like this:

1) Create animator:

let animator = SCIAnimations.createWaveAnimator(for: rSeries)

2) Create SeriesAnimatorListener class that conforms to ISCIAnimatorListener protocol:

class SeriesAnimatorListener: NSObject, ISCIAnimatorListener {
    func onAnimationEnd(_ animation: SCIValueAnimator!) {

    func onAnimationStart(_ animation: SCIValueAnimator!) {

    func onAnimationUpdate(_ animation: SCIValueAnimator!) {

    func onAnimationCancel(_ animation: SCIValueAnimator!) {

3) Create an instance of your listener and add it to the animator:

let listener = SeriesAnimatorListener()

4) Run you animation:

animator.start(withDuration: 2)

You should have print statements in the console.

let us know if that helped.

  • Hal Mueller
    Thanks. But I am now getting a crash. So I will still call that progress :) When I call `createWaveAnimator(for:columnCollection)`, I see an exception with message “Operation: currentRenderPassData is not avaliable on type: SCIVerticallyStackedColumnsCollection”. I will take that to mean that animations are no longer supported for vertically stacked columns. I can live without the animation, but I do need to have correct data range propagated to the axes before the `renderAnnotations()` call and configurationButtons loop. So I’ll focus there.
  • Andriy P
    Hi, there. Problem is that you can’t animate whole columnCollection. You have animate your renderable series, like this: let rSeries = SCIStackedColumnRenderableSeries() let columnCollection = SCIVerticallyStackedColumnsCollection() columnCollection.add(rSeries) let animator = SCIAnimations.createWaveAnimator(for: rSeries) … Let us know if it works
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.