Options
All
  • Public
  • Public/Protected
  • All
Menu

The default ISciChartLoader implementation. Displays a loading animation when the chart starts up

example

// If not set in SciChartSurface.create then the default loader is used SciChartSurface.create("elementId", { loader: new DefaultSciChartLoader(); });

Hierarchy

  • DefaultSciChartLoader

Implements

Index

Properties

type

type: "Default"

Methods

addChartLoader

  • addChartLoader(domChartRoot: HTMLDivElement, theme: IThemeProvider): HTMLElement
  • Called when a chart loader is added to the DOM.

    example
    public addChartLoader(domChartRoot: HTMLDivElement, theme: IThemeProvider): HTMLElement {
       const loaderContainerDiv = document.createElement("div");
       loaderContainerDiv.style.backgroundColor = theme.loadingAnimationBackground;
       loaderContainerDiv.style.height = "100%";
       loaderContainerDiv.style.width = "100%";
       const loaderText = document.createElement("p");
       loaderText.innerHTML = "Loading SciChart...";
       loaderText.style.color = theme.loadingAnimationForeground;
       loaderText.style.fontFamily = "Arial";
       loaderText.style.margin = "0";
       loaderText.style.padding = "50px";
       loaderContainerDiv.appendChild(loaderText);
       domChartRoot.appendChild(loaderContainerDiv);
       return loaderContainerDiv;
    }

    Parameters

    Returns HTMLElement

removeChartLoader

  • removeChartLoader(domChartRoot: HTMLDivElement, loaderElement: HTMLElement): void
  • Called to remove a chart loader from the DOM.

    example
    public removeChartLoader(domChartRoot: HTMLDivElement, loaderElement: HTMLElement): void {
       domChartRoot.removeChild(loaderElement);
    }

    Parameters

    • domChartRoot: HTMLDivElement
    • loaderElement: HTMLElement

    Returns void

toJSON

  • toJSON(): { type: "Default" }
  • Returns { type: "Default" }

    • type: "Default"

Generated using TypeDoc