Angular Startup Animation

Demonstrates how to run Startup Animations using SciChart.js, High Performance JavaScript Charts

Fullscreen

Edit

 Edit

Docs

drawExample.ts

Copy to clipboard
Minimise
Fullscreen
1// Loading ... 

Angular Startup Animation

Overview

This example demonstrates how to implement startup animations in SciChart.js using Angular. It sequentially animates chart series with four distinct effects—Wave, Sweep, Scale, and Fade—while a custom typewriter animation updates a watermark annotation to display the current animation effect. This approach enhances chart visual appeal and interactivity in Angular applications.

Technical Implementation

The chart is initialized by creating a SciChartSurface with numeric axes and two primary series: a bubble series and a spline line series. Animation objects (WaveAnimation, SweepAnimation, ScaleAnimation, and FadeAnimation) are defined and applied sequentially by enqueuing them on the series. A custom typewriter effect is implemented using GenericAnimation, which gradually updates the watermark text. This chaining of animations ensures smooth transitions, and developers can explore similar techniques through the Angular Startup Animation Demo and the Generic Animations documentation for deeper insights.

Features and Capabilities

The example provides real-time animation updates through a continuous loop that alternates the animation state every two seconds. It also illustrates built-in interactivity with chart modifiers such as ZoomPanModifier, ZoomExtentsModifier, and MouseWheelZoomModifier, which enhance user experience by providing intuitive zooming and panning controls.

Integration and Best Practices

For Angular developers, managing component lifecycle and cleanup is essential. Although the example centralizes chart initialization in a shared function, proper integration in an Angular component would involve disposing of the SciChartSurface during the component’s ngOnDestroy lifecycle hook to prevent memory leaks. Best practices for Angular integration and lifecycle management can be found in resources like Component Lifecycle Management in Angular: A Comprehensive Guide and the Getting Started with SciChart JS documentation. Performance optimizations are achieved by leveraging WebAssembly contexts and minimizing excessive DOM updates, ensuring smooth animation even in data-intensive scenarios.

SciChart Ltd, 16 Beaufort Court, Admirals Way, Docklands, London, E14 9XL.