JavaScript Generic Animation

Demonstrates how to run Generic Animation using SciChart.js, High Performance JavaScript Charts

Fullscreen

Edit

 Edit

Docs

drawExample.ts

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

JavaScript Generic Animation Example

Overview

This example demonstrates how to leverage SciChart.js with JavaScript to create dynamic and interactive 2D charts enhanced with smooth animations. The focus is on using the GenericAnimation class to create effects such as a typewriter reveal for the chart title, seamless annotation fade-ins, and fluid transitions between different bubble series.

Technical Implementation

The implementation begins with asynchronous initialization of the SciChartSurface as described in Getting Started with SciChart JS. The chart is constructed by setting up numeric axes, bubble series with XyzDataSeries and FastBubbleRenderableSeries, and integrating annotations directly into the visualization. Custom animations are created using the GenericAnimation class, which offers granular control over the animation progress. For example, a custom typewriter effect is implemented to reveal the chart title gradually, a technique that aligns with approaches covered in Javascript Beginner Tutorial - Typewriter Effect with Vanilla JS. The example also employs axis animations via the animateVisibleRange method to smoothly adjust axis ranges, as detailed in Axis Ranging - Set Range and Zoom to Fit - SciChart.

Features and Capabilities

Key features include real-time update animations that manage opacity transitions between annotations and bubble series, dynamic changes to axis titles, and coordinated delays that sequence various animations over time. These capabilities allow for visually engaging transitions and offer developers a template for implementing sophisticated interactive charts.

Integration and Best Practices

Built purely with JavaScript, this example avoids reliance on frameworks and demonstrates clean, efficient code management. It emphasizes asynchronous chart initialization, proper resource cleanup using sciChartSurface.delete(), and detailed control over animation timing. Additionally, performance optimization techniques are applied, ensuring responsiveness even during complex animation sequences. Developers can further explore performance strategies in Performance Optimisation of JavaScript Applications & Charts.

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