When SciChart.js starts up, a short wait-loader is shown as your server downloads Wasm (webassembly) files and asynchronously initializes our high performance WebGL Graphics engine.
The wait time is a one-off cost when the page loads, and once WebAssembly files have been cached by your browser, subsequent loads are very fast.
We show a wait-loader screen in SciChart.js which can be fully customized to match the styling of your app.
Default Wait Loader Styling
The Wait Loader picks up its styling from the theme. Since the default theme is SciChartJSDarkv2Theme the wait loader will have a dark background with light foreground.
Setting Wait Loader Foreground/Background Color
You can customize the wait loader foreground and background. To do this, set the IThemeProvider.loadingAnimationBackground and IThemeProvider.loadingAnimationForeground properties. This theme must then be passed into the constructor options of SciChartSurface.create, as the loader is shown before asynchronous creation of the chart.
Disabling the Wait Loader entirely
New to SciChart.js v3.4, you can now disable the wait-loader entirely. To do this, pass loader: false to SciChartSurface.create().
Customizing Wait Loader HTML
Further customization of the wait loader is possible by implementing a chart loader. You need to create a class which confirms to the ISciChartLoader interface and implement addChartLoader() and removeChartLoader() functions. This will let you put anything in the chart loader, for example images, a company logo or animations.
Here's an example below:
This results in the following output.
Awaiting multiple charts for synchronized Chart Loaders
Conclusion
So you can see now that SciChart.js supports several options for styling the chart wait-loader, to allow charts to fit in with your application theme.
See also our documentation below on styling & themeing, including colouring chart parts and creating custom themes.