Interface RenderContext

Represents contextual information needed when rendering a Mod, either in the UI or as part of an export.

interface RenderContext {
    imagePixelRatio: number;
    interactive: boolean;
    isEditing: boolean;
    styling: StylingInfo;
    signalRenderComplete(): void;
}

Properties

imagePixelRatio: number

Gets the image pixel ratio that shall be used when rendering rasterized images and/or using a canvas element.

interactive: boolean

Gets a value indicating whether the Mod is interactive.

When this value is false the Mod is not interactive. This occurs during export, for instance to an image or to PDF. This property can be used to hide selected controls and to avoid animations when rendering in an export context.

isEditing: boolean

Gets a value indicating whether the Spotfire UI is in editing mode.

When this value is true the Spotfire UI displays authoring UI elements, such as axis selectors. This property can be used to hide controls not meant for consumers of the analysis.

1.2

styling: StylingInfo

Gets information about the currently used theme.

Methods

  • Signals that the mod is ready to be exported.

    If this method is not called, Spotfire will perform export (and preview generation etc.) of the Mod without knowing if it has finished rendering.

    The default maximum allowed time for a Mod to finish rendering is 20 seconds.

    Returns void