JavaScript/jQuery Chart - Loading Indicator

When the Chart visualizes local data, loading is instant. But when the Chart is bound to a remote data source, loading may take a considerable amount of time. To keep the viewer's attention, the Chart can display a loading indicator.

DevExtreme HTML5 JavaScript Charts LoadingIndicator

To activate the loading indicator, assign true to the loadingIndicator.enabled property. When activated, the indicator will be displayed or hidden automatically as the chart's data is updated.

JavaScript
  • $(function() {
  • $("#chartContainer").dxChart({
  • // ...
  • loadingIndicator: {
  • enabled: true
  • }
  • });
  • });

If you need to show or hide the loading indicator at runtime, call the showLoadingIndicator() or hideLoadingIndicator() method.

JavaScript
  • var chart = $("#chartContainer").dxChart("instance");
  • chart.showLoadingIndicator();
  • chart.hideLoadingIndicator();
See Also